2019-09-09 18:04:49 +00:00
|
|
|
# Makefile for windows install pkg and helper library
|
|
|
|
|
2019-09-20 22:05:26 +00:00
|
|
|
CC=i686-w64-mingw32-gcc
|
|
|
|
CXX=i686-w64-mingw32-g++
|
|
|
|
CFLAGS=-Ofast -march=nocona -mfpmath=sse
|
|
|
|
LIBS=-lws2_32
|
2019-09-20 23:23:50 +00:00
|
|
|
LDFLAGS=-static
|
2019-09-20 22:05:26 +00:00
|
|
|
|
2019-10-12 19:01:24 +00:00
|
|
|
all: regdbhelper.dll lokinet-bootstrap.exe 7z.exe dbghelp tcpv6 tap-win32
|
2019-09-09 20:18:48 +00:00
|
|
|
default: all
|
|
|
|
|
2019-10-12 19:01:24 +00:00
|
|
|
ifndef RELEASE
|
2019-09-09 18:04:49 +00:00
|
|
|
regdbhelper.dll:
|
|
|
|
i686-w64-mingw32-gcc regdb_helper.c -o $@ -shared -Os -s
|
2019-09-09 20:18:48 +00:00
|
|
|
|
2019-09-20 22:05:26 +00:00
|
|
|
mbedtls:
|
|
|
|
wget https://tls.mbed.org/download/mbedtls-2.16.3-apache.tgz
|
|
|
|
tar xvf mbedtls-2.16.3-apache.tgz
|
|
|
|
patch -p0 -d mbedtls-2.16.3 < mbedtls-win32.patch
|
2019-09-20 23:23:50 +00:00
|
|
|
$(MAKE) -j4 -C mbedtls-2.16.3/library CC=$(CC) CXX=$(CXX) CFLAGS="$(CFLAGS)" LDFLAGS=$(LIBS)
|
|
|
|
mkdir -p lib; mkdir -p include
|
|
|
|
cp mbedtls-2.16.3/library/*.a lib
|
|
|
|
cp -r mbedtls-2.16.3/include/mbedtls include
|
2019-09-20 22:05:26 +00:00
|
|
|
|
2019-09-20 23:23:50 +00:00
|
|
|
curl:
|
|
|
|
wget https://curl.haxx.se/download/curl-7.66.0.tar.xz
|
|
|
|
tar xvf curl-7.66.0.tar.xz
|
|
|
|
patch -p1 < curl-win32.patch
|
2019-09-20 23:31:46 +00:00
|
|
|
cd curl-7.66.0; ./configure --host=i686-w64-mingw32 --target=i686-w64-mingw32 CC=$(CC) CXX=$(CXX) CFLAGS="$(CFLAGS)" LIBS=$(LIBS) --disable-shared --without-zlib --without-ssl --with-mbedtls=$(PWD) --enable-optimize --enable-http --disable-ftp --disable-file --disable-ldap --disable-ldaps --disable-rtsp --enable-proxy --disable-dict --disable-telnet --disable-tftp --disable-pop3 --disable-imap --disable-smb --disable-smtp --disable-gopher --enable-manual
|
2019-09-20 23:23:50 +00:00
|
|
|
$(MAKE) -j4 -C curl-7.66.0
|
|
|
|
|
2019-10-12 19:01:24 +00:00
|
|
|
lokinet-bootstrap.exe: mbedtls curl dbghelp
|
2019-09-20 23:23:50 +00:00
|
|
|
cp curl-7.66.0/src/curl.exe $@
|
|
|
|
wget -O rootcerts.pem https://curl.haxx.se/ca/cacert.pem
|
2019-09-21 02:00:31 +00:00
|
|
|
cp ../LICENSE .;unix2dos LICENSE LICENSE
|
2019-09-20 23:49:13 +00:00
|
|
|
|
2019-10-12 19:01:24 +00:00
|
|
|
dbghelp:
|
|
|
|
wget https://snowlight.net/loki/win32-dist/dbghelp32.dll
|
|
|
|
wget https://snowlight.net/loki/win32-dist/dbghelp64.dll
|
2019-09-20 23:49:13 +00:00
|
|
|
|
2019-10-12 19:01:24 +00:00
|
|
|
else
|
2019-09-20 23:49:13 +00:00
|
|
|
regdbhelper.dll:
|
2019-10-16 22:27:06 +00:00
|
|
|
wget https://snowlight.net/loki/win32-dist/dbghelp32.dll
|
|
|
|
wget https://snowlight.net/loki/win32-dist/dbghelp64.dll
|
|
|
|
wget https://snowlight.net/loki/win32-dist/regdbhelper.dll
|
2019-09-20 23:49:13 +00:00
|
|
|
|
|
|
|
lokinet-bootstrap.exe:
|
2019-10-16 22:27:06 +00:00
|
|
|
wget https://snowlight.net/loki/win32-dist/lokinet-bootstrap.exe
|
2019-09-20 23:49:13 +00:00
|
|
|
wget -O rootcerts.pem https://curl.haxx.se/ca/cacert.pem
|
2019-09-21 02:00:31 +00:00
|
|
|
cp ../LICENSE .;unix2dos LICENSE LICENSE
|
2019-10-12 19:01:24 +00:00
|
|
|
|
|
|
|
dbghelp:
|
|
|
|
:
|
2019-09-20 23:49:13 +00:00
|
|
|
endif
|
2019-09-09 20:18:48 +00:00
|
|
|
|
2019-10-12 19:01:24 +00:00
|
|
|
# Common rules
|
|
|
|
7z.exe:
|
|
|
|
wget https://snowlight.net/loki/win32-dist/7z.exe
|
|
|
|
|
|
|
|
tcpv6:
|
|
|
|
wget https://snowlight.net/loki/win32-dist/inet6.7z
|
|
|
|
|
|
|
|
tap-win32:
|
|
|
|
wget https://snowlight.net/loki/win32-dist/tap-windows-9.21.2.7z
|
|
|
|
mv tap-windows-9.21.2.7z tuntapv9_n6.7z
|
|
|
|
wget https://snowlight.net/loki/win32-dist/tap-windows-9.9.2_3.7z
|
|
|
|
mv tap-windows-9.9.2_3.7z tuntapv9.7z
|
|
|
|
|
2019-09-09 18:04:49 +00:00
|
|
|
clean:
|
2019-10-16 22:27:06 +00:00
|
|
|
-rm -rf curl-7* include lib mbedtls-2* *.exe *.dll *.pem *.7z
|