Browse Source

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

pull/1137/head
Hamish Coleman 1 year ago
parent
commit
0b662fc0f4
  1. 11
      Makefile
  2. 3
      config.mak.in
  3. 5
      configure.ac
  4. 21
      tools/Makefile

11
Makefile

@ -3,6 +3,7 @@ all:
export CC export CC
export AR export AR
export EXE
export CFLAGS export CFLAGS
export LDFLAGS export LDFLAGS
export LDLIBS export LDLIBS
@ -147,11 +148,11 @@ N2N_DEPS+=win32/n2n_win32.a
SUBDIRS+=win32 SUBDIRS+=win32
endif endif
APPS=edge APPS=edge$(EXE)
APPS+=supernode APPS+=supernode$(EXE)
APPS+=example_edge_embed_quick_edge_init APPS+=example_edge_embed_quick_edge_init$(EXE)
APPS+=example_edge_embed APPS+=example_edge_embed$(EXE)
APPS+=example_sn_embed APPS+=example_sn_embed$(EXE)
DOCS=edge.8.gz supernode.1.gz n2n.7.gz DOCS=edge.8.gz supernode.1.gz n2n.7.gz

3
config.mak.in

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

5
configure.ac

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

21
tools/Makefile

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

Loading…
Cancel
Save