-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
78 lines (67 loc) · 2.05 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
.POSIX:
.PHONY: all clean
.SUFFIXES: .cxx .o .xcf .png .svg .rc .res
-include windurrs.mk
SDL2_PKG = sdl2 SDL2_image SDL2_ttf
LIBS = $$(pkg-config --libs $(SDL2_PKG))
MY_CXXFLAGS = -Wall $$(pkg-config --cflags $(SDL2_PKG))
EXEEXT = .exe
OBJ = \
src/camera.o \
src/main.o \
src/game_mode.o \
src/menu_game_mode.o \
src/one_player_game_mode.o
RASTERS = \
images/favicon.png \
images/menuBack.png \
images/startGame.png \
images/settings.png \
images/credits.png \
images/quit.png \
images/menuRod.png \
images/menuGear.png \
images/lightForeground.png \
images/menuP.png \
images/shade.png \
images/startGame_clickToJoin.png \
images/startGame_blinkingLights.png \
images/keyboardInstructions.png \
images/inCredits.png \
images/redJoin.png \
images/blueJoin.png \
images/READY.png \
images/READY2.png \
images/BACK.png \
images/BACK2.png \
images/inQuit.png \
images/NAMES_MAPS.png \
images/THUMB_SkyBridge.png \
images/THUMB_SmokeRoom.png \
images/inMapChoose.png \
images/greenDown.png \
images/greenUp.png \
images/smokeRoom.png \
images/smoke_Room_Foreground.png \
images/smoke_Room_Furnace.png \
images/redBody.png \
images/blueBody.png \
MY_GIMP = $${GIMP-gimp}
all: testsdl$(EXEEXT) $(RASTERS)
testsdl$(EXEEXT): $(OBJ) $(RES) windurrs.mk
$(CXX) $(MY_CXXFLAGS) $(CXXFLAGS) -o '$(@)' $(OBJ) $(RES) $(LIBS)
windurrs.mk: Makefile
echo > windurrs.mk
n="$$(which ls)"; test "$${n##*ls}" = ".exe" && echo 'RES = main.res' >> windurrs.mk
main.res: main.rc images/favicon.ico
.cxx.o:
$(CXX) -c $(MY_CXXFLAGS) $(CXXFLAGS) $(CPPFLAGS) -o '$(@)' '$(<)'
.xcf.png:
$(MY_GIMP) -i -b '(let* ((image (car (gimp-file-load RUN-NONINTERACTIVE "$(<)" "$(<)")))) (file-png-save-defaults RUN-NONINTERACTIVE image (car (gimp-image-merge-visible-layers image CLIP-TO-IMAGE)) "$(@)" "$(@)"))' -b '(gimp-quit FALSE)'
.svg.png:
inkscape -e '$(@)' -d 120 '$(<)'
.rc.res:
windres '$(<)' -O coff -o '$(@)'
$(OBJ) $(RASTERS): Makefile
clean:
rm -f $(OBJ) $(RASTERS) $(RES) testsdl$(EXEEXT)