-
Notifications
You must be signed in to change notification settings - Fork 14
/
build-darwin
executable file
·59 lines (47 loc) · 1.93 KB
/
build-darwin
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
#!/bin/sh
export CC=gcc-13
export CXX=g++-13
# export CC=clang
# export CXX=clang++
ROOT=/
USR_ROOT=${ROOT}/opt
GNUSTEP_ROOT=${USR_ROOT}/GNUstep
export GNUSTEP_CONFIG_FILE=${USR_ROOT}/etc/GNUstep.conf
export GNUSTEP_INSTALL_LD_SO_CONF=no
# export LDFLAGS="-L/usr/local/opt/bison/lib -shared-libgcc "
echo "Installation directory is $GNUSTEP_ROOT"
echo "Building GNUstep for Darwin"
echo ""
export PKG_CONFIG_PATH=${USR_ROOT}/local/lib/pkgconfig:${USR_ROOT}/lib/pkgconfig:${PKG_CONFIG_PATH}
# export LDFLAGS+= -L/usr/local/Cellar/gcc/10.2.0/lib/gcc/10/
# Build make
echo "======== Build make"
cd tools-make
./configure --with-library-combo=apple-gnu-gnu --with-layout=gnustep --prefix=${GNUSTEP_ROOT}
# LDFLAGS=-L/usr/local/Cellar/gcc/10.2.0/lib/gcc/10/ CC=gcc-10 CXX=g++-10 DLYD_LIBRARY_PATH=/usr/local/Cellar/gcc/10.2.0/lib/gcc/10:${DYLD_LIBRARY_PATH} make install messages=no -j4
make install messages=no -j4
source ${GNUSTEP_ROOT}/System/Library/Makefiles/GNUstep.sh
# Build base
echo "======== Build base"
cd ../libs-base
# make GNUSTEP_INSTALLATION_DOMAIN=SYSTEM distclean
export CFLAGS+=-I/usr/local/include
./configure --with-installation-domain=SYSTEM --disable-icu --disable-invocations
make GNUSTEP_INSTALLATION_DOMAIN=SYSTEM debug=yes install messages=no -j4
# Build gui
echo "======== Build gui"
cd ../libs-gui
# make GNUSTEP_INSTALLATION_DOMAIN=SYSTEM distclean
./configure
CC=gcc-10 CXX=g++-10 DLYD_LIBRARY_PATH=/usr/local/Cellar/gcc/10.2.0/lib/gcc/10:${DYLD_LIBRARY_PATH} make GNUSTEP_INSTALLATION_DOMAIN=SYSTEM debug=yes install messages=no -j4
# Build backend
echo "======== Build back"
cd ../libs-back
# make GNUSTEP_INSTALLATION_DOMAIN=SYSTEM distclean
./configure
CC=gcc-10 CXX=g++-10 DLYD_LIBRARY_PATH=/usr/local/Cellar/gcc/10.2.0/lib/gcc/10:${DYLD_LIBRARY_PATH} make GNUSTEP_INSTALLATION_DOMAIN=SYSTEM debug=yes install messages=no -j4
# Set default backend
# defaults write NSGlobalDomain GSBackend libgnustep-cairo
echo ""
echo "Done."
exit 0