forked from martincohen/Punity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.bat
30 lines (21 loc) · 1.07 KB
/
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
29
30
@echo off
rem SDL static build:
rem The magical trick is to delete or rename the file "libSDL2.dll.a"
rem http://stackoverflow.com/questions/17620884/static-linking-of-sdl2-libraries
rem set SDL_DEPS=-lSDL2main -lSDL2 -lwinmm -limm32 -lole32 -loleaut32 -lversion
set SDL_DEPS=-lSDL2main -lSDL2
set MLP_FLAGS=-std=c99 src/punity.c -mwindows -I%~dp0. -I%~dp0src -I%~dp0lib/sdl/include -L%~dp0lib/sdl/lib -lmingw32 %SDL_DEPS%
echo ---------------------------------------------------------------------------
echo Compiling assets
echo ---------------------------------------------------------------------------
gcc -o bin/assets.exe -g -DASSETS %MLP_FLAGS%
bin\assets.exe %~dp0res/
rem mv res\res.h src\res.h
rem mv res\res.c src\res.c
echo ---------------------------------------------------------------------------
echo Compiling program
echo ---------------------------------------------------------------------------
gcc -o bin/mlp.exe -O2 %MLP_FLAGS%
strip bin\mlp.exe
echo ---------------------------------------------------------------------------
echo Done