-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
35 lines (25 loc) · 842 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
SIDESCROLLER_SRC=sidescroller.c
TOPVIEW_SRC=topview.c
SIDESCROLLER_OUT=sidescroller
TOPVIEW_OUT=topview
FLAGS=-Wall `sdl2-config --libs --cflags`
.PHONY: check-syntax clean help
all: $(SIDESCROLLER_OUT) $(TOPVIEW_OUT)
sidescroller: $(SIDESCROLLER_SRC)
$(CC) $(SIDESCROLLER_SRC) $(FLAGS) -o $@
topview: $(TOPVIEW_SRC)
$(CC) $(TOPVIEW_SRC) $(FLAGS) -o $@
clean:
-$(RM) $(SIDESCROLLER_OUT)
-$(RM) $(TOPVIEW_OUT)
help:
@echo Make rules
@echo $(SIDESCROLLER_OUT) Builds Linux Binary for the sidescroller engine
@echo $(TOPVIEW_OUT) Builds Linux Binary for the topview engine
@echo all Builds all Binaries
@echo clean Removes built binaries
@echo check-syntax Checks the syntax of the source files
check-syntax:
-$(CC) $(SIDESCROLLER_SRC) $(FLAGS) -o null -Wall
-$(CC) $(TOPVIEW_SRC) $(FLAGS) -o null -Wall
-$(RM) null