aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2020-08-04 16:15:21 +0200
committerToni Uhlig <matzeton@googlemail.com>2020-08-04 16:15:21 +0200
commit0004753eb1b7ebc7675df84b434f16c2b07b82f2 (patch)
treee935683d0cf76100e998ce0e5fbd67e5739b199a /Makefile
parent3fd32fb3376a32031c4bcbea38bad7482aa83215 (diff)
added basic "consumer" example
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 9 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index a61a901d7..fa016187e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
CC = gcc
-PROJECT_CFLAGS += -Wall -Wextra $(EXTRA_CFLAGS)
+PROJECT_CFLAGS += -Wall -Wextra $(EXTRA_CFLAGS) -I.
LIBS += -pthread -lpcap -lm
ifneq ($(CUSTOM_LIBNDPI),)
@@ -37,14 +37,19 @@ RM = rm -f
all: nDPId nDPIsrvd
+examples: examples/c-json-stdout/c-json-stdout
+
nDPId: help nDPId.c
- $(CC) $(PROJECT_CFLAGS) $(CFLAGS) nDPId.c -o $@ $(LDFLAGS) $(LIBS)
+ $(CC) $(PROJECT_CFLAGS) $(CFLAGS) $@.c -o $@ $(LDFLAGS) $(LIBS)
nDPIsrvd: nDPIsrvd.c
- $(CC) $(PROJECT_CFLAGS) $(CFLAGS) nDPIsrvd.c -o $@ $(LDFLAGS) $(LIBS)
+ $(CC) $(PROJECT_CFLAGS) $(CFLAGS) $@.c -o $@ $(LDFLAGS) $(LIBS)
+
+examples/c-json-stdout/c-json-stdout:
+ $(CC) $(PROJECT_CFLAGS) $(CFLAGS) $@.c -o $@ $(LDFLAGS) $(LIBS)
clean:
- $(RM) -f nDPId nDPIsrvd
+ $(RM) -f nDPId nDPIsrvd examples/c-json-stdout/c-json-stdout
help:
@echo 'CC = $(CC)'