From: =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= Subject: [kvm-unit-tests PATCH 2/2] api/x86: sanitize Makefile Date: Fri, 19 May 2017 18:48:18 +0200 Message-ID: <20170519164818.21375-3-rkrcmar@redhat.com> References: <20170519164818.21375-1-rkrcmar@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Paolo Bonzini To: kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:37870 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755434AbdESQsp (ORCPT ); Fri, 19 May 2017 12:48:45 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C4CAC8048E for ; Fri, 19 May 2017 16:48:44 +0000 (UTC) In-Reply-To: <20170519164818.21375-1-rkrcmar@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: We weren't cleaning api/, rules were needlessly repetitive, and c++ specific flags weren't in CXXFLAGS. Signed-off-by: Radim Krčmář --- x86/Makefile.common | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/x86/Makefile.common b/x86/Makefile.common index 57e8e45388cd..7bb6b50c3975 100644 --- a/x86/Makefile.common +++ b/x86/Makefile.common @@ -51,14 +51,12 @@ tests-common = $(TEST_DIR)/vmexit.flat $(TEST_DIR)/tsc.flat \ $(TEST_DIR)/hyperv_synic.flat $(TEST_DIR)/hyperv_stimer.flat \ ifdef API -tests-common += api/api-sample -tests-common += api/dirty-log -tests-common += api/dirty-log-perf +tests-api = api/api-sample api/dirty-log api/dirty-log-perf OBJDIRS += api endif -test_cases: $(tests-common) $(tests) +test_cases: $(tests-common) $(tests) $(tests-api) $(TEST_DIR)/%.o: CFLAGS += -std=gnu99 -ffreestanding -I $(SRCDIR)/lib -I $(SRCDIR)/lib/x86 -I lib @@ -75,9 +73,10 @@ $(TEST_DIR)/hyperv_stimer.elf: $(TEST_DIR)/hyperv.o arch_clean: $(RM) $(TEST_DIR)/*.o $(TEST_DIR)/*.flat $(TEST_DIR)/*.elf \ - $(TEST_DIR)/.*.d lib/x86/.*.d + $(TEST_DIR)/.*.d lib/x86/.*.d \ + $(tests-api) api/*.o api/*.a api/.*.d -api/%.o: CFLAGS += -m32 -std=gnu++11 +api/%.o: CXXFLAGS += -m32 -std=gnu++11 api/%: LDLIBS += -lstdc++ -lpthread -lrt api/%: LDFLAGS += -m32 @@ -85,8 +84,4 @@ api/%: LDFLAGS += -m32 api/libapi.a: api/kvmxx.o api/identity.o api/exception.o api/memmap.o $(AR) rcs $@ $^ -api/api-sample: api/api-sample.o api/libapi.a - -api/dirty-log: api/dirty-log.o api/libapi.a - -api/dirty-log-perf: api/dirty-log-perf.o api/libapi.a +$(tests-api) : % : %.o api/libapi.a -- 2.13.0