n2n/tools/Makefile.in
Logan oos Even 51a3a71f95
introduced n2n-portfwd tool (#1008)
* moved dev to version 3.1.1

* introduced n2n-portfwd tool

* moved port-forwarding source to tool

* adjusted tiny things, seemingly works with ./configure's  --enable-miniupnp  and  --enable-natpmp

* adjusted for Windows

* wished for better typing skills

* applied some finishing touch

* typo
2022-06-05 18:05:40 +02:00

46 lines
1.1 KiB
Makefile

#
# This is not a standalone makefile, it must be called from the toplevel
# makefile to inherit the correct environment
DEBUG?=-g3
HEADERS=$(wildcard include/*.h)
CFLAGS+=-I../include
ifeq ($(CONFIG_TARGET),mingw)
CFLAGS+=-I../win32
endif
CFLAGS+=$(DEBUG)
LDFLAGS+=-L..
N2N_LIB=../libn2n.a
TOOLS=n2n-benchmark n2n-keygen n2n-route n2n-portfwd
TOOLS+=@ADDITIONAL_TOOLS@
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)/