mirror of https://github.com/ntop/n2n.git
emanuele-f
5 years ago
9 changed files with 77 additions and 19 deletions
@ -0,0 +1,38 @@ |
|||||
|
CC?=gcc |
||||
|
DEBUG?=-g3 |
||||
|
#OPTIMIZATION?=-O2
|
||||
|
WARN?=-Wall |
||||
|
|
||||
|
INSTALL=install |
||||
|
INSTALL_PROG=$(INSTALL) -m755 |
||||
|
MKDIR=mkdir -p |
||||
|
|
||||
|
LIBS_EDGE_OPT=@N2N_LIBS@ |
||||
|
LIBS_EDGE+=$(LIBS_EDGE_OPT) |
||||
|
HEADERS=../n2n_wire.h ../n2n.h ../twofish.h ../n2n_transforms.h |
||||
|
CFLAGS+=-I.. |
||||
|
LDFLAGS+=-L.. |
||||
|
CFLAGS+=$(DEBUG) $(OPTIMIZATION) $(WARN) |
||||
|
|
||||
|
N2N_LIB=../libn2n.a |
||||
|
|
||||
|
TOOLS=n2n-benchmark |
||||
|
TOOLS+=@ADDITIONAL_TOOLS@ |
||||
|
|
||||
|
.PHONY: all clean install |
||||
|
all: $(TOOLS) |
||||
|
|
||||
|
n2n-benchmark: benchmark.c $(N2N_LIB) $(HEADERS) |
||||
|
$(CC) $(CFLAGS) $< $(N2N_LIB) $(LIBS_EDGE) -o $@ |
||||
|
|
||||
|
n2n-decode: n2n_decode.c $(N2N_LIB) $(HEADERS) |
||||
|
$(CC) $(CFLAGS) $< $(N2N_LIB) $(LIBS_EDGE) -lpcap -o $@ |
||||
|
|
||||
|
.c.o: $(HEADERS) ../Makefile Makefile |
||||
|
$(CC) $(CFLAGS) -c $< -o $@ |
||||
|
|
||||
|
clean: |
||||
|
rm -rf $(TOOLS) $(N2N_LIB) *.o *.dSYM *~ |
||||
|
|
||||
|
install: $(TOOLS) |
||||
|
$(INSTALL_PROG) $(TOOLS) $(SBINDIR)/ |
Loading…
Reference in new issue