-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild-desktop.sh
45 lines (36 loc) · 1016 Bytes
/
build-desktop.sh
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
#! /bin/sh
PRELOAD_DIR=resources
# exit if some part fails
set -e
if [[ -z "${JAYLIB_WASM_DEMO_SKIP_DEPS}" ]]; then
echo "[Preparing janet amalgamated bits]..."
cd janet && \
make clean && \
make && \
cd ..
echo "[Preparing libraylib.a]..."
cd jaylib/raylib/src && \
make clean && \
make &&
cd ../../..
echo "[Preparing jaylib.janet shim]..."
mkdir -p ${PRELOAD_DIR} && \
janet make-jaylib-janet-shim.janet \
jaylib/src ${PRELOAD_DIR}/jaylib.janet
fi
[ -e janet/build/c/janet.c ] || \
(echo "janet/build/c/janet.c not found, please build" && exit 1)
[ -e jaylib/raylib/src/libraylib.a ] || \
(echo "jaylib/raylib/src/libraylib.a not found, please build" && exit 1)
echo "[Compiling output]..."
gcc \
-O0 -g3 \
-Wall \
-o main \
main.c \
janet/build/c/janet.c \
jaylib/raylib/src/libraylib.a \
-Ijanet/build \
-Ijaylib/src \
-Ijaylib/raylib/src \
-lm -lpthread -ldl