diff options
author | Philippe Antoine <contact@catenacyber.fr> | 2020-01-13 16:49:45 +0100 |
---|---|---|
committer | Philippe Antoine <contact@catenacyber.fr> | 2020-01-14 08:20:15 +0100 |
commit | fe312ffbe153a3ce16264d68f19bdb164ed57a5c (patch) | |
tree | a322c38489f291df2c71ea9db78dcfd4f8c767c2 /example | |
parent | da5208ee68c1281095e62abb820780fbe7b29bdc (diff) |
Compile libndpireader
Diffstat (limited to 'example')
-rw-r--r-- | example/Makefile.in | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/example/Makefile.in b/example/Makefile.in index bda7cbe9e..cc47b3047 100644 --- a/example/Makefile.in +++ b/example/Makefile.in @@ -11,8 +11,14 @@ PREFIX?=@prefix@ all: ndpiReader @DPDK_TARGET@ -ndpiReader: $(OBJS) $(LIBNDPI) - $(CXX) $(CFLAGS) $(OBJS) -o $@ $(LDFLAGS) +EXECUTABLE_SOURCES := ndpiReader.c +COMMON_SOURCES := $(filter-out $(EXECUTABLE_SOURCES),$(wildcard *.c )) + +libndpiReader.a: $(COMMON_SOURCES:%.c=%.o) $(LIBNDPI) + ar rsv libndpiReader.a $(COMMON_SOURCES:%.c=%.o) + +ndpiReader: libndpiReader.a $(LIBNDPI) $(EXECUTABLE_SOURCES:%.c=%.o) + $(CXX) $(CFLAGS) $(EXECUTABLE_SOURCES:%.c=%.o) libndpiReader.a -o $@ $(LDFLAGS) %.o: %.c $(HEADERS) Makefile $(CC) $(CFLAGS) -c $< -o $@ |