-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathbuild-mingw64_nt-clang
executable file
·64 lines (52 loc) · 1.86 KB
/
build-mingw64_nt-clang
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/sh
# GNUSTEP_MSYS=${MSYSTEM,,}/../
export MSYS_ROOT=/
export USR_ROOT=${MSYS_ROOT}usr
export GNUSTEP_ROOT=${USR_ROOT}/GNUstep
export GNUSTEP_DOMAIN_OBJC=Local
export CC="clang"
export CXX="clang++"
export LDFLAGS="-fuse-ld=lld -lstdc++ -lgcc_s"
# echo "Copying patched shlwapi.h header"
# cp ./tools-scripts/Patched/shlwapi.h /mingw64/x86_64-w64-mingw32/include/shlwapi.h
echo "** Installation directory is $GNUSTEP_ROOT"
echo "** Building GNUstep for MSYS64 + libobjc2 + clang on Windows"
echo ""
export PKG_CONFIG_PATH=${USR_ROOT}/local/lib/pkgconfig:${USR_ROOT}/lib/pkgconfig:${PKG_CONFIG_PATH}
# Build make
echo ""
echo "############## Build tools-make"
cd tools-make
make GNUSTEP_INSTALLATION_DOMAIN=SYSTEM distclean
./configure --with-library-combo=ng-gnu-gnu --with-runtime-abi=gnustep-2.0 --with-layout=gnustep --prefix=${GNUSTEP_ROOT}
make install messages=yes -j${nproc}
source ${GNUSTEP_ROOT}/System/Library/Makefiles/GNUstep.sh
cd ..
# Build base
echo ""
echo "############## Build libs-base"
cd libs-base
make GNUSTEP_INSTALLATION_DOMAIN=SYSTEM distclean
CFLAGS+=-I/usr/local/include LDFLAGS+=-L/usr/local/lib ./configure --with-installation-domain=SYSTEM --disable-libdispatch --disable-icu --without-unwind
make GNUSTEP_INSTALLATION_DOMAIN=SYSTEM debug=yes install messages=no -j${nproc}
cd ..
# Build gui
echo ""
echo "############## Build libs-gui"
cd libs-gui
make GNUSTEP_INSTALLATION_DOMAIN=SYSTEM distclean
./configure
make GNUSTEP_INSTALLATION_DOMAIN=SYSTEM debug=yes install messages=no -j${nproc}
cd ..
# Build backend
echo ""
echo "############## Build libs-back"
cd libs-back
make GNUSTEP_INSTALLATION_DOMAIN=SYSTEM distclean
./configure --enable-graphics=cairo && make GNUSTEP_INSTALLATION_DOMAIN=SYSTEM debug=yes install messages=no -j4
cd ..
# Set default backend
# defaults write NSGlobalDomain GSBackend libgnustep-cairo
echo ""
echo "** Done."
exit 0