Files
UltraGrid/.github/scripts/Windows/install_natpmp.sh
Martin Pulec 96b9ff511c Win CI scripts: create /usr/local/* if not
Ensure that /usr/local/{bin,include,lib} are created in scrips that copy
to that.

This is not problem for the CI because `.github/scripts/Windows/prepare_msys.sh`
already creates them but the scripts are standalone installers and it
can be run independently by a developer to install the particular dependency.
2023-04-11 13:02:24 +02:00

17 lines
495 B
Bash
Executable File

#!/bin/sh -eux
git clone --depth 1 https://github.com/miniupnp/libnatpmp
cd libnatpmp
gcc -c -Wall -Os -DWIN32 -DNATPMP_STATICLIB -DENABLE_STRNATPMPERR getgateway.c
gcc -c -Wall -Os -DWIN32 -DNATPMP_STATICLIB -DENABLE_STRNATPMPERR natpmp.c
gcc -c -Wall -Os -DWIN32 wingettimeofday.c
ar cr natpmp.a getgateway.o natpmp.o wingettimeofday.o
mkdir -p /usr/local/include /usr/local/lib
cp natpmp.a /usr/local/lib/libnatpmp.a
cp natpmp_declspec.h natpmp.h /usr/local/include
cd -
rm -rf libnatpmp