annotate Makefile @ 26:288e688aaac3

Build system improvements.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 19 Aug 2017 15:46:11 +0300
parents 9830a8be6eba
children 8a604636b077
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
f339a3903bc9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 #
f339a3903bc9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
2 # Generic build target
f339a3903bc9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
3 #
26
288e688aaac3 Build system improvements.
Matti Hamalainen <ccr@tnsp.org>
parents: 25
diff changeset
4 include config.mak
0
f339a3903bc9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
5
f339a3903bc9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
6 export DMLIB
19
da7ac3f7d014 Work on build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 3
diff changeset
7 export BINPATH
0
f339a3903bc9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
8
19
da7ac3f7d014 Work on build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 3
diff changeset
9 linux-bin:
da7ac3f7d014 Work on build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 3
diff changeset
10 $(MAKE) -f $(DMLIB)Makefile EXEEXT=-linux.bin
0
f339a3903bc9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
11
f339a3903bc9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
12 mingw-win32:
f339a3903bc9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
13 $(MAKE) -f $(DMLIB)Makefile.cross-mingw \
19
da7ac3f7d014 Work on build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 3
diff changeset
14 OBJPATH=$(BPATH)/obj/win32/ \
0
f339a3903bc9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
15 MINGW_PREFIX=i686-w64-mingw32- \
f339a3903bc9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
16 MINGW_PATH=/usr/i686-w64-mingw32
f339a3903bc9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
17
f339a3903bc9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
18 mingw-win64:
f339a3903bc9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
19 $(MAKE) -f $(DMLIB)Makefile.cross-mingw \
19
da7ac3f7d014 Work on build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 3
diff changeset
20 OBJPATH=$(BPATH)/obj/win64/ \
0
f339a3903bc9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
21 MINGW_PREFIX=x86_64-w64-mingw32- \
f339a3903bc9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
22 MINGW_PATH=/usr/x86_64-w64-mingw32
f339a3903bc9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
23
19
da7ac3f7d014 Work on build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 3
diff changeset
24 $(DATA):
23
Matti Hamalainen <ccr@tnsp.org>
parents: 20
diff changeset
25 cd $(BPATH)/data && $(DMLIB)/tools/packed -p $@ -c -x \*~ -v *
19
da7ac3f7d014 Work on build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 3
diff changeset
26
26
288e688aaac3 Build system improvements.
Matti Hamalainen <ccr@tnsp.org>
parents: 25
diff changeset
27 package: linux-bin mingw-win32 $(DATA)
20
07316b0cdace Strip binaries.
Matti Hamalainen <ccr@tnsp.org>
parents: 19
diff changeset
28 strip $(BINPATH)/*.bin $(BINPATH)/*.exe
19
da7ac3f7d014 Work on build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 3
diff changeset
29 $(RM) $(PACKAGE)
26
288e688aaac3 Build system improvements.
Matti Hamalainen <ccr@tnsp.org>
parents: 25
diff changeset
30 @cp LICENSE.txt README.txt file_id.diz $(BINPATH)
25
9830a8be6eba Fix quotation.
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
31 cd $(BINPATH) && zip -x "*~" -9 $(PACKAGE) *
19
da7ac3f7d014 Work on build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 3
diff changeset
32
da7ac3f7d014 Work on build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 3
diff changeset
33
0
f339a3903bc9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
34 clean:
19
da7ac3f7d014 Work on build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 3
diff changeset
35 -$(RM) $(DATA)
da7ac3f7d014 Work on build process.
Matti Hamalainen <ccr@tnsp.org>
parents: 3
diff changeset
36 -$(MAKE) -f $(DMLIB)Makefile clean EXEEXT=-linux.bin
0
f339a3903bc9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
37 -$(MAKE) -f $(DMLIB)Makefile.cross-mingw clean
f339a3903bc9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
38