Skip to content
This repository has been archived by the owner on Mar 26, 2021. It is now read-only.

Commit

Permalink
Fixup build
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur Gautier <[email protected]>
  • Loading branch information
Arthur Gautier committed Mar 24, 2015
1 parent b4279bc commit 58d1354
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 30 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ export CFLAGS
DIRS-y += lib
DIRS-y += app


include $(RTE_SDK)/mk/rte.extsubdir.mk

8 changes: 7 additions & 1 deletion app/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ APP = l3fwd
# all source are stored in SRCS-y
SRCS-y := main.c
SRCS-y += control.c
SRCS-y += $(RTE_OUTPUT)/../../lib/libneighbour/$(RTE_TARGET)/lib/libneighbour.a
SRCS-y += $(RTE_OUTPUT)/../../lib/libnetlink/$(RTE_TARGET)/lib/libnetlink.a

#SRCS-y += lib/libnetlink/netlink.so
#SRCS-y += lib/libneighbour/neighbour.so
Expand All @@ -18,7 +20,11 @@ SRCS-y += control.c
CFLAGS += -O3 $(USER_FLAGS)
CFLAGS += $(WERROR_FLAGS)
CFLAGS += -I$(RTE_SDK)/$(RTE_TARGET)/include
CFLAGS += -I$(BASE_OUTPUT)/include
CFLAGS += -I$(RTE_SRCDIR)/../lib/libneighbour/
CFLAGS += -I$(RTE_SRCDIR)/../lib/libnetlink/


LDFLAGS += -lc -lpthread -ldl
#LDFLAGS += -lneighbour -L$(RTE_OUTPUT)/lib

DEPDIR-y := lib
Expand Down
20 changes: 5 additions & 15 deletions lib/libneighbour/Makefile
Original file line number Diff line number Diff line change
@@ -1,23 +1,13 @@

include $(RTE_SDK)/mk/rte.extvars.mk
SHARED = libneighbour.so
include $(RTE_SDK)/mk/rte.vars.mk

LIB = libneighbour.a

CFLAGS += -I$(RTE_SDK)/$(RTE_TARGET)/include
CFLAGS += -I$(SRCDIR)

SRCS-y += neighbour.c

HEADERS-y += libneighbour.h

POSTBUILD += install-headers

.PHONY: install-headers
install-headers: $(HEADERS-y)
mkdir -p $(BASE_OUTPUT)/include
for file in $(HEADERS-y); do\
rm -f $(BASE_OUTPUT)/include/$$file;\
cp -f $$file $(BASE_OUTPUT)/include;\
done

SYMLINK-y-include += libneighbour.h

include $(RTE_SDK)/mk/rte.extshared.mk
include $(RTE_SDK)/mk/rte.extlib.mk
18 changes: 4 additions & 14 deletions lib/libnetlink/Makefile
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@

include $(RTE_SDK)/mk/rte.extvars.mk
SHARED = libnetlink.so
include $(RTE_SDK)/mk/rte.vars.mk
LIB= libnetlink.a

CFLAGS += -I$(RTE_SDK)/$(RTE_TARGET)/include
CFLAGS += -I$(SRCDIR)

SRCS-y += netlink.c

HEADERS-y += libnetlink.h
SYMLINK-y-include += libnetlink.h

POSTBUILD += install-headers

.PHONY: install-headers
install-headers: $(HEADERS-y)
mkdir -p $(BASE_OUTPUT)/include
for file in $(HEADERS-y); do\
rm -f $(BASE_OUTPUT)/include/$$file;\
cp -f $$file $(BASE_OUTPUT)/include;\
done

include $(RTE_SDK)/mk/rte.extshared.mk
include $(RTE_SDK)/mk/rte.extlib.mk

0 comments on commit 58d1354

Please sign in to comment.