Mercurial > hg > demos > bussi
annotate Makefile @ 33:18d1d8d26a18
Improve build system.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 21 Aug 2017 15:42:21 +0300 |
parents | e53990e89a52 |
children | 2239a5ccf827 |
rev | line source |
---|---|
0 | 1 # |
2 # Generic build target | |
3 # | |
26 | 4 include config.mak |
0 | 5 |
6 export DMLIB | |
19 | 7 export BINPATH |
0 | 8 |
19 | 9 linux-bin: |
10 $(MAKE) -f $(DMLIB)Makefile EXEEXT=-linux.bin | |
0 | 11 |
12 mingw-win32: | |
13 $(MAKE) -f $(DMLIB)Makefile.cross-mingw \ | |
19 | 14 OBJPATH=$(BPATH)/obj/win32/ \ |
0 | 15 MINGW_PREFIX=i686-w64-mingw32- \ |
16 MINGW_PATH=/usr/i686-w64-mingw32 | |
17 | |
18 mingw-win64: | |
19 $(MAKE) -f $(DMLIB)Makefile.cross-mingw \ | |
19 | 20 OBJPATH=$(BPATH)/obj/win64/ \ |
0 | 21 MINGW_PREFIX=x86_64-w64-mingw32- \ |
22 MINGW_PATH=/usr/x86_64-w64-mingw32 | |
23 | |
33 | 24 $(DATA): $(wildcard $(BPATH)/data/*) |
23 | 25 cd $(BPATH)/data && $(DMLIB)/tools/packed -p $@ -c -x \*~ -v * |
19 | 26 |
30
e53990e89a52
Add build targets "tools" and "data".
Matti Hamalainen <ccr@tnsp.org>
parents:
27
diff
changeset
|
27 tools: |
33 | 28 @if test ! -e $(DMLIB)config.mak; then cp $(DMLIB)config.mak.in $(DMLIB)config.mak; fi |
29 @cd $(DMLIB) && make -j4 | |
30
e53990e89a52
Add build targets "tools" and "data".
Matti Hamalainen <ccr@tnsp.org>
parents:
27
diff
changeset
|
30 |
e53990e89a52
Add build targets "tools" and "data".
Matti Hamalainen <ccr@tnsp.org>
parents:
27
diff
changeset
|
31 data: tools $(DATA) |
e53990e89a52
Add build targets "tools" and "data".
Matti Hamalainen <ccr@tnsp.org>
parents:
27
diff
changeset
|
32 |
26 | 33 package: linux-bin mingw-win32 $(DATA) |
20 | 34 strip $(BINPATH)/*.bin $(BINPATH)/*.exe |
19 | 35 $(RM) $(PACKAGE) |
33 | 36 cp SDL.dll LICENSE.txt README.txt file_id.diz $(BINPATH) |
25 | 37 cd $(BINPATH) && zip -x "*~" -9 $(PACKAGE) * |
19 | 38 |
39 | |
0 | 40 clean: |
19 | 41 -$(RM) $(DATA) |
42 -$(MAKE) -f $(DMLIB)Makefile clean EXEEXT=-linux.bin | |
0 | 43 -$(MAKE) -f $(DMLIB)Makefile.cross-mingw clean |
44 |