summaryrefslogtreecommitdiffhomepage
path: root/contrib/npclient/COMPILE.TXT
blob: d355fbccebf71a76edfc7961f6bb8823fc6e5c7f (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh

# This makes small binaries:

CC=clang
CFLAGS='-Wall -Wextra -Wpedantic -Os -s -ffunction-sections -fdata-sections -Wl,--kill-at,--nxcompat,--dynamicbase,--as-needed,--gc-sections,--strip-all'

cd -- "$(dirname -- "$0")" &&
PATH=/mingw32/bin:"$PATH" sh -c "$CC -m32 $CFLAGS -mdll -o NPClient.dll npclient.c" &&
PATH=/mingw64/bin:"$PATH" sh -c "$CC -m64 $CFLAGS -mdll -o NPClient64.dll npclient.c" &&
ls -l NPClient{64,}.dll && mv NPClient{64,}.dll ../../bin/