mirror of
https://github.com/ntop/n2n.git
synced 2026-10-19 16:16:12 +00:00
simplified the makefiles (#795)
* Move the makefiles towards a clearer arrangement * Break circular make dependancy and start using implicit rules for most compilation * Fix old cmake to compile again after renames
This commit is contained in:
+7
-12
@@ -14,13 +14,13 @@ else
|
||||
SBINDIR=$(PREFIX)/sbin
|
||||
endif
|
||||
|
||||
LIBS_EDGE_OPT=@N2N_LIBS@
|
||||
LIBS_EDGE+=$(LIBS_EDGE_OPT)
|
||||
LDLIBS+=-ln2n
|
||||
LDLIBS+=@N2N_LIBS@
|
||||
HEADERS=$(wildcard include/*.h)
|
||||
CFLAGS+=-I../include @CFLAGS@
|
||||
LDFLAGS+=-L..
|
||||
CFLAGS+=$(DEBUG) $(OPTIMIZATION) $(WARN)
|
||||
LDFLAGS=@LDFLAGS@
|
||||
LDFLAGS+=@LDFLAGS@
|
||||
|
||||
N2N_LIB=../libn2n.a
|
||||
|
||||
@@ -30,17 +30,12 @@ TOOLS+=@ADDITIONAL_TOOLS@
|
||||
.PHONY: all clean install
|
||||
all: $(TOOLS)
|
||||
|
||||
n2n-benchmark: benchmark.c $(N2N_LIB) $(HEADERS)
|
||||
$(CC) $(CFLAGS) $< $(LDFLAGS) $(N2N_LIB) $(LIBS_EDGE) -o $@
|
||||
|
||||
n2n-keygen: keygen.c $(N2N_LIB) $(HEADERS)
|
||||
$(CC) $(CFLAGS) $< $(LDFLAGS) $(N2N_LIB) $(LIBS_EDGE) -o $@
|
||||
n2n-benchmark.o: $(N2N_LIB) $(HEADERS) ../Makefile Makefile
|
||||
n2n-keygen.o: $(N2N_LIB) $(HEADERS) ../Makefile Makefile
|
||||
|
||||
n2n-decode: n2n_decode.c $(N2N_LIB) $(HEADERS)
|
||||
$(CC) $(CFLAGS) $< $(LDFLAGS) $(N2N_LIB) $(LIBS_EDGE) -lpcap -o $@
|
||||
|
||||
.c.o: $(HEADERS) ../Makefile Makefile
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
n2n-decode: n2n-decode.c $(N2N_LIB) $(HEADERS) ../Makefile Makefile
|
||||
$(CC) $(CFLAGS) $< $(LDFLAGS) $(LDLIBS) -lpcap -o $@
|
||||
|
||||
clean:
|
||||
rm -rf $(TOOLS) *.o *.dSYM *~
|
||||
|
||||
Reference in New Issue
Block a user