mirror of
https://github.com/ntop/n2n.git
synced 2024-09-19 16:41:11 +02:00
Move the examples to their own directory
This commit is contained in:
parent
6ddaaaa917
commit
6b8ba8aa94
19
Makefile
19
Makefile
|
@ -102,6 +102,7 @@ N2N_DEPS=$(wildcard include/*.h) $(wildcard src/*.c) config.mak
|
||||||
# As source files pass the linter, they can be added here (If all the source
|
# As source files pass the linter, they can be added here (If all the source
|
||||||
# is passing the linter tests, this can be refactored)
|
# is passing the linter tests, this can be refactored)
|
||||||
LINT_CCODE=\
|
LINT_CCODE=\
|
||||||
|
examples/example_edge_embed_quick_edge_init.c \
|
||||||
include/curve25519.h \
|
include/curve25519.h \
|
||||||
include/header_encryption.h \
|
include/header_encryption.h \
|
||||||
include/hexdump.h \
|
include/hexdump.h \
|
||||||
|
@ -114,7 +115,6 @@ LINT_CCODE=\
|
||||||
include/speck.h \
|
include/speck.h \
|
||||||
include/tf.h \
|
include/tf.h \
|
||||||
src/edge_management.c \
|
src/edge_management.c \
|
||||||
src/example_edge_embed_quick_edge_init.c \
|
|
||||||
src/header_encryption.c \
|
src/header_encryption.c \
|
||||||
src/management.c \
|
src/management.c \
|
||||||
src/management.h \
|
src/management.h \
|
||||||
|
@ -142,9 +142,6 @@ LDLIBS+=$(LDLIBS_EXTRA)
|
||||||
|
|
||||||
APPS=edge$(EXE)
|
APPS=edge$(EXE)
|
||||||
APPS+=supernode$(EXE)
|
APPS+=supernode$(EXE)
|
||||||
APPS+=example_edge_embed_quick_edge_init$(EXE)
|
|
||||||
APPS+=example_edge_embed$(EXE)
|
|
||||||
APPS+=example_sn_embed$(EXE)
|
|
||||||
|
|
||||||
DOCS=edge.8.gz supernode.1.gz n2n.7.gz
|
DOCS=edge.8.gz supernode.1.gz n2n.7.gz
|
||||||
|
|
||||||
|
@ -162,6 +159,7 @@ BUILD_DEP:=\
|
||||||
yamllint \
|
yamllint \
|
||||||
|
|
||||||
SUBDIRS+=tools
|
SUBDIRS+=tools
|
||||||
|
SUBDIRS+=examples
|
||||||
|
|
||||||
COVERAGEDIR?=coverage
|
COVERAGEDIR?=coverage
|
||||||
|
|
||||||
|
@ -177,20 +175,14 @@ version:
|
||||||
@echo -n "Build for version: "
|
@echo -n "Build for version: "
|
||||||
@scripts/version.sh
|
@scripts/version.sh
|
||||||
|
|
||||||
tools: $(N2N_LIB)
|
examples tools: $(N2N_LIB)
|
||||||
$(MAKE) -C $@
|
$(MAKE) -C $@
|
||||||
|
|
||||||
src/edge.o: $(N2N_DEPS)
|
src/edge.o: $(N2N_DEPS)
|
||||||
src/supernode.o: $(N2N_DEPS)
|
src/supernode.o: $(N2N_DEPS)
|
||||||
src/example_edge_embed_quick_edge_init.o: $(N2N_DEPS)
|
|
||||||
src/example_sn_embed.o: $(N2N_DEPS)
|
|
||||||
src/example_edge_embed.o: $(N2N_DEPS)
|
|
||||||
|
|
||||||
src/edge: $(N2N_LIB)
|
src/edge: $(N2N_LIB)
|
||||||
src/supernode: $(N2N_LIB)
|
src/supernode: $(N2N_LIB)
|
||||||
src/example_edge_embed_quick_edge_init: $(N2N_LIB)
|
|
||||||
src/example_sn_embed: $(N2N_LIB)
|
|
||||||
src/example_edge_embed: $(N2N_LIB)
|
|
||||||
|
|
||||||
ifneq (,$(findstring mingw,$(CONFIG_HOST_OS)))
|
ifneq (,$(findstring mingw,$(CONFIG_HOST_OS)))
|
||||||
N2N_OBJS+=src/win32/edge_utils_win32.o
|
N2N_OBJS+=src/win32/edge_utils_win32.o
|
||||||
|
@ -205,9 +197,6 @@ src/win32/edge_rc.o: src/win32/edge.rc
|
||||||
src/edge: src/win32/edge_rc.o
|
src/edge: src/win32/edge_rc.o
|
||||||
src/edge.exe: src/edge
|
src/edge.exe: src/edge
|
||||||
src/supernode.exe: src/supernode
|
src/supernode.exe: src/supernode
|
||||||
src/example_edge_embed_quick_edge_init.exe: src/example_edge_embed_quick_edge_init
|
|
||||||
src/example_sn_embed.exe: src/example_sn_embed
|
|
||||||
src/example_edge_embed.exe: src/example_edge_embed
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
%: src/%
|
%: src/%
|
||||||
|
@ -281,7 +270,7 @@ build-dep-brew:
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
rm -f src/edge.o src/supernode.o src/example_edge_embed.o src/example_edge_embed_quick_edge_init.o src/example_sn_embed.o
|
rm -f src/edge.o src/supernode.o
|
||||||
rm -rf $(N2N_OBJS) $(N2N_LIB) $(APPS) $(DOCS) $(COVERAGEDIR)/ *.dSYM *~
|
rm -rf $(N2N_OBJS) $(N2N_LIB) $(APPS) $(DOCS) $(COVERAGEDIR)/ *.dSYM *~
|
||||||
rm -f tests/*.out src/*.gcno src/*.gcda
|
rm -f tests/*.out src/*.gcno src/*.gcda
|
||||||
for dir in $(SUBDIRS); do $(MAKE) -C $$dir clean; done
|
for dir in $(SUBDIRS); do $(MAKE) -C $$dir clean; done
|
||||||
|
|
20
examples/Makefile
Normal file
20
examples/Makefile
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
#
|
||||||
|
# These examples are intended to show how to use the libn2n as an embedded
|
||||||
|
# service within other software.
|
||||||
|
#
|
||||||
|
|
||||||
|
EXAMPLES+=example_edge_embed_quick_edge_init
|
||||||
|
EXAMPLES+=example_edge_embed
|
||||||
|
EXAMPLES+=example_sn_embed
|
||||||
|
|
||||||
|
all: $(EXAMPLES)
|
||||||
|
|
||||||
|
CFLAGS+=-I../include
|
||||||
|
LDFLAGS+=-L../
|
||||||
|
|
||||||
|
example_edge_embed_quick_edge_init: ../libn2n.a
|
||||||
|
example_sn_embed: ../libn2n.a
|
||||||
|
example_edge_embed: ../libn2n.a
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f $(EXAMPLES)
|
Loading…
Reference in New Issue
Block a user