From patchwork Fri May 19 16:48:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFkaW0gS3LEjW3DocWZ?= X-Patchwork-Id: 9737713 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DB6BC6034C for ; Fri, 19 May 2017 16:48:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BCF2E284BD for ; Fri, 19 May 2017 16:48:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B1D28284BF; Fri, 19 May 2017 16:48:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,HK_RANDOM_FROM, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 632B1284BD for ; Fri, 19 May 2017 16:48:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755363AbdESQsr (ORCPT ); Fri, 19 May 2017 12:48:47 -0400 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) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com C4CAC8048E Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=rkrcmar@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com C4CAC8048E Received: from potion (dhcp-1-124.brq.redhat.com [10.34.1.124]) by smtp.corp.redhat.com (Postfix) with SMTP id 231AA7D969; Fri, 19 May 2017 16:48:41 +0000 (UTC) Received: by potion (sSMTP sendmail emulation); Fri, 19 May 2017 18:48:41 +0200 From: =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= To: kvm@vger.kernel.org Cc: Paolo Bonzini 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> In-Reply-To: <20170519164818.21375-1-rkrcmar@redhat.com> References: <20170519164818.21375-1-rkrcmar@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 19 May 2017 16:48:45 +0000 (UTC) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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