-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (26 loc) · 789 Bytes
/
Makefile
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
.POSIX:
.SUFFIXES:
CC=gcc
WCC=x86_64-w64-mingw32-gcc
BUILD_FLAGS=-l raylib -l m -l GL -l pthread -l dl -l rt -l X11 -Wall
run: main
./output/DNLF.x86
run-debug: debug
gdb ./output/DNLF.x86
main: main.c
mkdir -p output
$(CC) main.c lib/*.c $(BUILD_FLAGS) -o output/DNLF.x86
debug: main.c
mkdir -p output
$(CC) main.c lib/*.c $(BUILD_FLAGS) -g -fsanitize=undefined -o output/DNLF.x86
raylib: lib/raylib/src/libraylib.a
cd lib/raylib/src; \
make clean; \
make OS=Windows_NT CC=x86_64-w64-mingw32-gcc AR=x86_64-w64-mingw32-ar
windows: main.c raylib
mkdir -p output
$(WCC) main.c lib/*.c -I 'lib/raylib/src/' 'lib/raylib/src/libraylib.a' -l m -l gdi32 -l winmm -g -o output/DNLF.x86.exe
clean:
rm -f output/DNLF.x86
rm -f output/DNLF.x86.exe
.PHONY: run run-debug clean