File: win.make

package info (click to toggle)
blockattack 1.4.1%2Bds1-2.1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 6,260 kB
  • ctags: 1,038
  • sloc: cpp: 9,461; ansic: 142; makefile: 38
file content (93 lines) | stat: -rw-r--r-- 2,522 bytes parent folder | download
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
GAMEDIR=../../Game/

BINARY=$(GAMEDIR)blockattack.exe

CC=i586-mingw32msvc-gcc

CPP=i586-mingw32msvc-g++

BASE_CFLAGS=-c $(shell sdl-config --cflags)


BASE_LIBS=$(shell sdl-config --libs) -lSDL_image -lSDL_mixer -lSDL_ttf

#For developement only 
ifndef DEBUG
DEBUG=1
endif

ifndef NETWORK
NETWORK=1
endif

#Never use the apstract fs, it is not implemented and just linking it breaks on some systems
ifndef USE_ABSTRACT_FS
USE_ABSTRACT_FS=0
endif

#Compile with debug information or optimized.
ifeq ($(DEBUG),1)
BASE_CFLAGS += -g -DDEBUG=1
else
BASE_CFLAGS += -O4
endif

ifeq ($(NETWORK),1)
BASE_CFLAGS += -DNETWORK=1
BASE_LIBS += -lenet
else
BASE_CFLAGS += -DNETWORK=0
endif

ifeq ($(USE_ABSTRACT_FS),1)
BASE_CFLAGS += -DUSE_ABSTRACT_FS=1
BASE_LIBS += -lphysfs
else
BASE_CFLAGS += -DUSE_ABSTRACT_FS=0
endif

$(BINARY): 	winbuild/main.o winbuild/highscore.o winbuild/SFont.o winbuild/ReadKeyboard.o winbuild/joypad.o winbuild/listFiles.o winbuild/replay.o winbuild/common.o winbuild/stats.o winbuild/uploadReplay.o
	$(CPP) -O -o $(BINARY) winbuild/main.o winbuild/highscore.o winbuild/SFont.o winbuild/ReadKeyboard.o winbuild/joypad.o winbuild/listFiles.o winbuild/replay.o winbuild/common.o winbuild/stats.o $(BASE_LIBS)
#-lphysfs

winbuild/main.o:	main.cpp BlockGame.hpp mainVars.hpp common.h
	$(CPP) $(BASE_CFLAGS) main.cpp -o winbuild/main.o

winbuild/highscore.o: highscore.h highscore.cpp
	$(CPP) $(BASE_CFLAGS) highscore.cpp -o winbuild/highscore.o

winbuild/SFont.o: SFont.h SFont.c
	$(CC) $(BASE_CFLAGS) SFont.c -o winbuild/SFont.o

winbuild/ReadKeyboard.o: ReadKeyboard.h ReadKeyboard.cpp
	$(CPP) $(BASE_CFLAGS) ReadKeyboard.cpp -o winbuild/ReadKeyboard.o

winbuild/joypad.o: joypad.h joypad.cpp
	$(CPP) $(BASE_CFLAGS) joypad.cpp -o winbuild/joypad.o

winbuild/listFiles.o: listFiles.h listFiles.cpp
	$(CPP) $(BASE_CFLAGS) listFiles.cpp -o winbuild/listFiles.o

winbuild/replay.o: replay.h replay.cpp
	$(CPP) $(BASE_CFLAGS) replay.cpp -o winbuild/replay.o

winbuild/stats.o: stats.h stats.cc
	$(CPP) $(BASE_CFLAGS) stats.cc -o winbuild/stats.o

winbuild/common.o: common.h common.cc
	$(CPP) $(BASE_CFLAGS) common.cc -o winbuild/common.o

winbuild/uploadReplay.o: uploadReplay.cc uploadReplay.h
	$(CPP) $(BASE_CFLAGS) uploadReplay.cc -o winbuild/uploadReplay.o

#winbuild/MenuSystem.o: MenuSystem.cc MenuSystem.h
#	$(CPP) $(BASE_CFLAGS) MenuSystem.cc -o winbuild/MenuSystem.o

#winbuild/ttfont.o: ttfont.h ttfont.cc
#	$(CPP) $(BASE_CFLAGS) ttfont.cc -o winbuild/ttfont.o


run: $(BINARY)

clean:
	rm winbuild/*o