summary refs log tree commit diff stats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile45
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 @@
1PROJECT = mazeoflife
2LTARGET = build/$(PROJECT)
3WTARGET = build/$(PROJECT).exe
4CC = g++
5WINCC = i586-mingw32msvc-g++
6WINDRES = i586-mingw32msvc-windres
7FILES = $(addprefix build/,$(wildcard *.cpp))
8HEADERS = $(wildcard *.h)
9MODULES = $(patsubst %.cpp,%,$(FILES))
10SOURCES = $(addsuffix .o,$(MODULES))
11WINSRC = $(addsuffix win,$(SOURCES))
12RES = $(wildcard resources/*)
13CRES = $(patsubst resources/%,build/%,$(RES))
14LINCCFL = `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/
15LINLDFL = `sdl-config --libs` -lSDL_ttf -lSDL_net
16WINCCFL = `/opt/SDL-1.2.9/bin/i386-mingw32msvc-sdl-config --cflags` -DWINDOWS
17WINLDFL = `/opt/SDL-1.2.9/bin/i386-mingw32msvc-sdl-config --libs` -lSDL_ttf -lSDL_net
18
19all: init $(LTARGET) $(WTARGET)
20linux: init $(LTARGET)
21windows: init $(WTARGET)
22
23init:
24 mkdir -p build
25
26clean:
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
41build/winres.o: winres.rc
42 $(WINDRES) $? $@
43
44$(CRES): build/%: resources/%
45 cp $? $@