Move the special windows lib config into the configure script

This commit is contained in:
Hamish Coleman 2023-07-02 16:58:42 +01:00
parent b22c57a16f
commit 59ecadcab2
3 changed files with 7 additions and 2 deletions

View File

@ -154,7 +154,6 @@ LDLIBS+=$(LDLIBS_EXTRA)
ifeq ($(CONFIG_TARGET),mingw)
LDLIBS+=$(abspath win32/n2n_win32.a)
LDLIBS+=-lnetapi32 -lws2_32 -liphlpapi
N2N_DEPS+=win32/n2n_win32.a
SUBDIRS+=win32
endif

View File

@ -18,6 +18,9 @@ case "$host_os" in
# and comment "For OpenSolaris (Solaris too?)"
LIBS="-lsocket -lnsl $LIBS"
;;
mingw*)
LIBS="-lnetapi32 -lws2_32 -liphlpapi $LIBS"
;;
esac
# This replicates the old config logic from the Makefile.

View File

@ -18,12 +18,15 @@ chmod a+x configure
cat >config.mak <<EOF
CONFIG_HOST=x86_64-w64-mingw32
CONFIG_HOST_OS=mingw32
CONFIG_PREFIX=/usr/local
CC=gcc
AR=ar
WINDRES=windres
CFLAGS=$CFLAGS -g -O2
LDFLAGS=$LDFLAGS
LDLIBS_EXTRA=$LDLIBS
LDLIBS_EXTRA=-lnetapi32 -lws2_32 -liphlpapi
EOF
cat <<EOF >include/config.h