@@ -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:
@@ -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
@@ -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:
@@ -6,8 +6,6 @@
ODP_ROOT = ../..
ODP_APP = odp_packet
-EXTRA_CFLAGS += -I.
-
include $(ODP_ROOT)/Makefile.inc
include ../Makefile.inc
@@ -6,7 +6,6 @@
ODP_ROOT = ../..
ODP_APP = odp_packet
-EXTRA_CFLAGS += -I.
EXTRA_CFLAGS += -DODP_HAVE_NETMAP
include $(ODP_ROOT)/Makefile.inc
Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> --- 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(-)