-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.bat
29 lines (26 loc) · 900 Bytes
/
build.bat
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
set CFLAGS=-D_CRT_SECURE_NO_WARNINGS -DPLATFORM_DESKTOP
rem -fsanitize=undefined -fsanitize=address
echo %CC%
if %CC% EQU cl (
set LINKFLAGS=gdi32.lib winmm.lib user32.lib shell32.lib
set EXTRA_CFLAGS=
set TARGET=-Fe:Clock3D_cl
set OBJS=raudio.obj rcore.obj rglfw.obj rmodels.obj rshapes.obj rtext.obj rtextures.obj utils.obj
set SUBSYSTEM=/link /SUBSYSTEM:windows
) else (
set LINKFLAGS=-lwinmm -lgdi32 -luser32 -lshell32
set EXTRA_CFLAGS=
rem -Wall -Wextra -Wconversion
set OBJS= *.o
set TARGET=-o 3DClock_clang.exe
set SUBSYSTEM=-mwindows
)
if not exist .\build (
mkdir build
pushd build
call %CC% -c %CFLAGS% %EXTRA_CFLAGS% %USERFLAGS% -I../raylib/src/external/glfw/include ../raylib/src/*.c
popd
)
pushd build
call %CC% %CFLAGS% %LINKFLAGS% %EXTRA_CFLAGS% %USERFLAGS% -I../raylib/src/ ../src/main.c %OBJS% %TARGET% %SUBSYSTEM%
popd