mirror of
https://github.com/ntop/n2n.git
synced 2024-09-19 16:41:11 +02:00
1accc76ad3
It looks like the github windows build environment is not correctly inheriting environment variables. Which is strange, as that has not been changed with the recent updates. Include the vars directly as a workaround (and plan to refactor later)
54 lines
1.3 KiB
Makefile
54 lines
1.3 KiB
Makefile
#
|
|
# This is not a standalone makefile, it must be called from the toplevel
|
|
# makefile to inherit the correct environment
|
|
|
|
# The vars included here should be part of the environment.
|
|
# TODO - refactor this and debug why they need to be included for windows
|
|
include ../config.mak
|
|
|
|
DEBUG?=-g3
|
|
|
|
HEADERS=$(wildcard include/*.h)
|
|
CFLAGS+=-I../include
|
|
LDLIBS+=-ln2n
|
|
|
|
ifeq ($(CONFIG_TARGET),mingw)
|
|
CFLAGS+=-I../win32
|
|
LDLIBS+=$(abspath ../win32/n2n_win32.a)
|
|
LDLIBS+=-lnetapi32 -lws2_32 -liphlpapi
|
|
endif
|
|
CFLAGS+=$(DEBUG)
|
|
LDFLAGS+=-L..
|
|
|
|
N2N_LIB=../libn2n.a
|
|
|
|
TOOLS=n2n-benchmark n2n-keygen n2n-route n2n-portfwd
|
|
TOOLS+=$(TOOLS_ADDITIONAL)
|
|
|
|
TESTS=tests-compress tests-elliptic tests-hashing tests-transform
|
|
TESTS+=tests-wire
|
|
TESTS+=tests-auth
|
|
|
|
.PHONY: all clean install
|
|
all: $(TOOLS) $(TESTS)
|
|
|
|
n2n-benchmark.o: $(N2N_LIB) $(HEADERS) ../Makefile Makefile
|
|
n2n-keygen.o: $(N2N_LIB) $(HEADERS) ../Makefile Makefile
|
|
n2n-route.o: $(N2N_LIB) $(HEADERS) ../Makefile Makefile
|
|
n2n-portfwd.o: $(N2N_LIB) $(HEADERS) ../Makefile Makefile
|
|
|
|
n2n-decode: n2n-decode.c $(N2N_LIB) $(HEADERS) ../Makefile Makefile
|
|
$(CC) $(CFLAGS) $< $(LDFLAGS) $(LDLIBS) -lpcap -o $@
|
|
|
|
# See comments in the topdir Makefile about how to generate coverage
|
|
# data.
|
|
gcov:
|
|
gcov $(TOOLS) $(TESTS)
|
|
|
|
clean:
|
|
rm -rf $(TOOLS) *.o *.dSYM *~
|
|
rm -f $(TESTS) *.gcno *.gcda
|
|
|
|
install: $(TOOLS)
|
|
$(INSTALL_PROG) $(TOOLS) $(SBINDIR)/
|