diff options
author | Starla Insigna <starla4444@gmail.com> | 2013-08-25 17:07:35 -0400 |
---|---|---|
committer | Starla Insigna <starla4444@gmail.com> | 2013-08-25 17:07:35 -0400 |
commit | d47da18958b5214def5127e201f60668c566d9bb (patch) | |
tree | 00751c11ff7d44c9e8bd56e0f4c670bb337095aa /Makefile | |
parent | 387685d34e6c4ebee776a700a01fed4df05446be (diff) | |
download | mazeoflife-d47da18958b5214def5127e201f60668c566d9bb.tar.gz mazeoflife-d47da18958b5214def5127e201f60668c566d9bb.tar.bz2 mazeoflife-d47da18958b5214def5127e201f60668c566d9bb.zip |
Moved to an autoconf-based build system
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/Makefile b/Makefile deleted file mode 100644 index 8a9d3b5..0000000 --- a/Makefile +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | PROJECT = mazeoflife | ||
2 | LTARGET = build/$(PROJECT) | ||
3 | WTARGET = build/$(PROJECT).exe | ||
4 | CC = g++ | ||
5 | WINCC = i586-mingw32msvc-g++ | ||
6 | WINDRES = i586-mingw32msvc-windres | ||
7 | FILES = $(addprefix build/,$(wildcard *.cpp)) | ||
8 | HEADERS = $(wildcard *.h) | ||
9 | MODULES = $(patsubst %.cpp,%,$(FILES)) | ||
10 | SOURCES = $(addsuffix .o,$(MODULES)) | ||
11 | WINSRC = $(addsuffix win,$(SOURCES)) | ||
12 | RES = $(wildcard resources/*) | ||
13 | CRES = $(patsubst resources/%,build/%,$(RES)) | ||
14 | LINCCFL = `sdl-config --cflags` -I/usr/local/Cellar/sdl_net/1.2.8/include/SDL/ -I/usr/local/Cellar/sdl_ttf/2.0.11/include/SDL/ | ||
15 | LINLDFL = `sdl-config --libs` -lSDL_ttf -lSDL_net | ||
16 | WINCCFL = `/opt/SDL-1.2.9/bin/i386-mingw32msvc-sdl-config --cflags` -DWINDOWS | ||
17 | WINLDFL = `/opt/SDL-1.2.9/bin/i386-mingw32msvc-sdl-config --libs` -lSDL_ttf -lSDL_net | ||
18 | |||
19 | all: init $(LTARGET) $(WTARGET) | ||
20 | linux: init $(LTARGET) | ||
21 | windows: init $(WTARGET) | ||
22 | |||
23 | init: | ||
24 | mkdir -p build | ||
25 | |||
26 | clean: | ||
27 | rm -rdfv build | ||
28 | |||
29 | $(LTARGET): $(SOURCES) $(CRES) | ||
30 | $(CC) $(SOURCES) -o $(LTARGET) $(LINLDFL) | ||
31 | |||
32 | $(SOURCES): build/%.o: %.cpp $(HEADERS) | ||
33 | $(CC) -c $< -o $@ $(LINCCFL) | ||
34 | |||
35 | $(WTARGET): $(WINSRC) $(CRES) build/winres.o | ||
36 | $(WINCC) $(WINSRC) build/winres.o -o $(WTARGET) $(WINLDFL) | ||
37 | |||
38 | $(WINSRC): build/%.owin: %.cpp $(HEADERS) | ||
39 | $(WINCC) -c $< -o $@ $(WINCCFL) | ||
40 | |||
41 | build/winres.o: winres.rc | ||
42 | $(WINDRES) $? $@ | ||
43 | |||
44 | $(CRES): build/%: resources/% | ||
45 | cp $? $@ | ||