A bunch of hacks to allow builds to understand the stupid windows filenames

This commit is contained in:
Hamish Coleman 2023-07-02 17:40:11 +01:00
parent 4d2e92ac81
commit 0b662fc0f4
4 changed files with 29 additions and 9 deletions

View File

@ -3,6 +3,7 @@ all:
export CC
export AR
export EXE
export CFLAGS
export LDFLAGS
export LDLIBS
@ -147,11 +148,11 @@ N2N_DEPS+=win32/n2n_win32.a
SUBDIRS+=win32
endif
APPS=edge
APPS+=supernode
APPS+=example_edge_embed_quick_edge_init
APPS+=example_edge_embed
APPS+=example_sn_embed
APPS=edge$(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

View File

@ -6,9 +6,12 @@ CONFIG_HOST_OS=@host_os@
CONFIG_PREFIX=@prefix@
PACKAGE_VERSION=@PACKAGE_VERSION@
CC=@CC@
AR=@AR@
WINDRES=@WINDRES@
EXE=@EXE@
CFLAGS=@CFLAGS@
LDFLAGS=@LDFLAGS@
LDLIBS_EXTRA=@LIBS@

View File

@ -20,6 +20,10 @@ case "$host_os" in
;;
mingw*)
LIBS="-lnetapi32 -lws2_32 -liphlpapi $LIBS"
EXE=".exe"
;;
*)
EXE=""
;;
esac
@ -114,6 +118,7 @@ AS_IF([test "x$enable_pthread" != xno],
AC_SUBST(host)
AC_SUBST(host_os)
AC_SUBST(EXE)
AC_SUBST(WINDRES)
AC_CONFIG_HEADERS(include/config.h)
AC_CONFIG_FILES(config.mak)

View File

@ -15,11 +15,18 @@ LDFLAGS+=-L..
N2N_LIB=../libn2n.a
TOOLS=n2n-benchmark n2n-keygen n2n-route n2n-portfwd n2n-decode
TOOLS+=n2n-benchmark$(EXE)
TOOLS+=n2n-keygen$(EXE)
TOOLS+=n2n-route$(EXE)
TOOLS+=n2n-portfwd$(EXE)
TOOLS+=n2n-decode$(EXE)
TESTS=tests-compress tests-elliptic tests-hashing tests-transform
TESTS+=tests-wire
TESTS+=tests-auth
TESTS=tests-compress$(EXE)
TESTS+=tests-elliptic$(EXE)
TESTS+=tests-hashing$(EXE)
TESTS+=tests-transform$(EXE)
TESTS+=tests-wire$(EXE)
TESTS+=tests-auth$(EXE)
.PHONY: all clean install
all: $(TOOLS) $(TESTS)
@ -30,6 +37,10 @@ n2n-route.o: $(N2N_LIB) $(HEADERS) ../config.mak
n2n-portfwd.o: $(N2N_LIB) $(HEADERS) ../config.mak
n2n-decode.o: $(N2N_LIB) $(HEADERS) ../config.mak
# HACK for windows.
%.exe: %
cp $< $@
# See comments in the topdir Makefile about how to generate coverage
# data.
gcov: