From patchwork Tue Feb 25 13:47:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Savolainen X-Patchwork-Id: 25296 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f70.google.com (mail-yh0-f70.google.com [209.85.213.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D965B20543 for ; Tue, 25 Feb 2014 13:46:00 +0000 (UTC) Received: by mail-yh0-f70.google.com with SMTP id c41sf12749529yho.5 for ; Tue, 25 Feb 2014 05:46:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:to:cc:subject:date:message-id :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe:content-type; bh=EB3zZ47ZUkkrO3aHseabuq+Ce1RJ4wIP7d1h8MvjfME=; b=VDpEwZgJFQAWc3BW9sbArWV3pwuoja9p1aUJaHkRDJZrULG+Z6hVZkznu9jY+u0YNf Vwfj4WhHwzWdJQ4M9JAkA8j0ORPmB9+WqnFn6XEBUawkSyGyLTn4/GpKZIceW63U7o7U i5XnuRu5eZzmFe2lmNOL6VQDSdtmrLltWDc9d9eDoxNM8GxavkraOV6qzjEXvGQaXfzw mW6tJq3FwuKMUaXjWr8YX4wzc/5L8cqLZWEhMyhooMmittAaoEAo5elNE7bgbGb8BX/4 5dbOc3V06h2Mn0ZsSinCL72Kyj+VIOifJ+ANZZnaA12blVjKm/IMVSqPgI4jwCp2dbO3 tELQ== X-Gm-Message-State: ALoCoQmoriYLupKvGMN70PBHElJTO1M3k4mcmkZ0fpQ0KN8wyhDAuHccntFogHr54Hhbz+HgmaDn X-Received: by 10.59.11.65 with SMTP id eg1mr634914ved.11.1393335960627; Tue, 25 Feb 2014 05:46:00 -0800 (PST) MIME-Version: 1.0 X-BeenThere: lng-odp@linaro.org Received: by 10.140.97.196 with SMTP id m62ls2507325qge.11.gmail; Tue, 25 Feb 2014 05:45:59 -0800 (PST) X-Received: by 10.140.18.142 with SMTP id 14mr34232492qgf.10.1393335959159; Tue, 25 Feb 2014 05:45:59 -0800 (PST) Received: from mail-qa0-f46.google.com (mail-qa0-f46.google.com [209.85.216.46]) by mx.google.com with ESMTPS id i33si12090686qgf.180.2014.02.25.05.45.59 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Feb 2014 05:45:59 -0800 (PST) Received-SPF: neutral (google.com: 209.85.216.46 is neither permitted nor denied by best guess record for domain of petri.savolainen@linaro.org) client-ip=209.85.216.46; Received: by mail-qa0-f46.google.com with SMTP id k15so364958qaq.19 for ; Tue, 25 Feb 2014 05:45:59 -0800 (PST) X-Received: by 10.140.82.175 with SMTP id h44mr36479461qgd.68.1393335958912; Tue, 25 Feb 2014 05:45:58 -0800 (PST) Received: from localhost.localdomain (ec2-23-23-178-99.compute-1.amazonaws.com. [23.23.178.99]) by mx.google.com with ESMTPSA id r40sm30069378qga.23.2014.02.25.05.45.56 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Feb 2014 05:45:58 -0800 (PST) From: Petri Savolainen To: lng-odp@linaro.org Cc: Petri Savolainen Subject: [lng-odp] [PATCH] Makefile cleanup continued Date: Tue, 25 Feb 2014 15:47:08 +0200 Message-Id: <1393336028-15009-1-git-send-email-petri.savolainen@linaro.org> X-Mailer: git-send-email 1.8.5.3 X-Original-Sender: petri.savolainen@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.216.46 is neither permitted nor denied by best guess record for domain of petri.savolainen@linaro.org) smtp.mail=petri.savolainen@linaro.org Precedence: list Mailing-list: list lng-odp@linaro.org; contact lng-odp+owners@linaro.org List-ID: X-Google-Group-Id: 474323889996 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Signed-off-by: Petri Savolainen --- Makefile.inc | 26 ++++++++++++++------------ test/api_test/Makefile | 2 -- test/example/Makefile | 5 +---- test/packet/Makefile | 2 -- test/packet_netmap/Makefile | 1 - 5 files changed, 15 insertions(+), 21 deletions(-) diff --git a/Makefile.inc b/Makefile.inc index 0b27bd9..a5aeb8b 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -4,31 +4,33 @@ # SPDX-License-Identifier: BSD-3-Clause PLATFORM ?= linux-generic -EXTRA_CFLAGS += -DODP_DEBUG=1 -EXTRA_CFLAGS += -O3 - -OBJ_DIR = ./obj +OBJ_DIR = ./obj ODP_DIR = $(ODP_ROOT)/platform/$(PLATFORM) -EXTRA_CFLAGS += -W -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -EXTRA_CFLAGS += -Wmissing-declarations -Wold-style-definition -Wpointer-arith -EXTRA_CFLAGS += -Wcast-align -Wnested-externs -Wcast-qual -Wformat-nonliteral -EXTRA_CFLAGS += -Wformat-security -Wundef -Wwrite-strings CC ?= gcc LD ?= gcc AR ?= ar - ECHO := @echo MKDIR := mkdir -p RMDIR := rm -rf RM := rm -f COPY := cp -r -EXTRA_CFLAGS += -pthread +EXTRA_CFLAGS += -DODP_DEBUG=1 +EXTRA_CFLAGS += -O3 +#EXTRA_CFLAGS += -O0 -g +EXTRA_CFLAGS += -pthread +EXTRA_CFLAGS += -W -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes +EXTRA_CFLAGS += -Wmissing-declarations -Wold-style-definition -Wpointer-arith +EXTRA_CFLAGS += -Wcast-align -Wnested-externs -Wcast-qual -Wformat-nonliteral +EXTRA_CFLAGS += -Wformat-security -Wundef -Wwrite-strings + + LDFLAGS += -pthread -LDFLAGS += -lrt -LDFLAGS += $(EXTRA_CFLAGS) +LDFLAGS += $(CFLAGS) + +STD_LIBS += -lrt .PHONY: default default: diff --git a/test/api_test/Makefile b/test/api_test/Makefile index 1748c45..ea3dbc4 100644 --- a/test/api_test/Makefile +++ b/test/api_test/Makefile @@ -12,8 +12,6 @@ ODP_ATOMIC = odp_atomic ODP_SHM = odp_shm ODP_RING = odp_ring -EXTRA_CFLAGS += -I$(ODP_ROOT)/platform/linux-generic/include - include $(ODP_ROOT)/Makefile.inc include ../Makefile.inc diff --git a/test/example/Makefile b/test/example/Makefile index 1774b83..2dc148a 100644 --- a/test/example/Makefile +++ b/test/example/Makefile @@ -12,9 +12,6 @@ include ../Makefile.inc .PHONY: default default: $(OBJ_DIR) $(ODP_APP) - -CFLAGS += -I. - OBJS = OBJS += $(OBJ_DIR)/odp_example.o @@ -35,7 +32,7 @@ $(OBJ_DIR)/%.o: %.c # $(ODP_APP): $(ODP_LIB) $(OBJS) $(ECHO) Linking $< - $(CC) $(LDFLAGS) $(OBJS) $(ODP_LIB) -o $@ + $(CC) $(LDFLAGS) $(OBJS) $(ODP_LIB) $(STD_LIBS) -o $@ .PHONY: clean clean: diff --git a/test/packet/Makefile b/test/packet/Makefile index 87227ae..b4c0e5b 100644 --- a/test/packet/Makefile +++ b/test/packet/Makefile @@ -6,8 +6,6 @@ ODP_ROOT = ../.. ODP_APP = odp_packet -EXTRA_CFLAGS += -I. - include $(ODP_ROOT)/Makefile.inc include ../Makefile.inc diff --git a/test/packet_netmap/Makefile b/test/packet_netmap/Makefile index 4cbf071..d1bf807 100644 --- a/test/packet_netmap/Makefile +++ b/test/packet_netmap/Makefile @@ -6,7 +6,6 @@ ODP_ROOT = ../.. ODP_APP = odp_packet -EXTRA_CFLAGS += -I. EXTRA_CFLAGS += -DODP_HAVE_NETMAP include $(ODP_ROOT)/Makefile.inc