Debian Codegraph @

makefile

raw
1 TARGET=adtrack2
2 SOURCES=\
3 adt2data.pas\
4 adt2ext2.pas\
5 adt2ext3.pas\
6 adt2ext4.pas\
7 adt2ext5.pas\
8 adt2extn.pas\
9 adt2keyb.pas\
10 adt2opl3.pas\
11 adt2pack.pas\
12 adt2sys.pas\
13 adt2text.pas\
14 adt2unit.pas\
15 adt2vesa.pas\
16 adtrack2.pas\
17 depackio.pas\
18 dialogio.pas\
19 iloaders.inc\
20 iloadins.inc\
21 instedit.inc\
22 ipattern.inc\
23 ipattord.inc\
24 iss_tim.pas\
25 menulib1.pas\
26 menulib2.pas\
27 opl3emu.pas\
28 parserio.pas\
29 realtime.inc\
30 stringio.pas\
31 txtscrio.pas\
32 typcons1.inc\
33 typcons2.inc
34
35 .PHONY: all
36 all: $(TARGET)
37
38 .PHONY: run
39 run: $(TARGET)
40 ./$(TARGET)
41
42
43 .PHONY: clean
44 clean:
45 rm -f *.o *.s *.res *.ppu *.map *.fpd *.sym *.cfg adtrack2
46 rm -f sdl/*.o sdl/*.ppu
47
48 .PHONY: release
49 release: release_
50 rm -rf release/adtrack-*/
51 echo -e "\n\n\nyour files are ready at release/\n"
52
53 .PHONY: release_
54 release_: all
55 rm -rf release
56 mkdir release
57 mkdir release/src
58 cp -r *.pas *.inc Makefile TODO *.bat sdl.dll sdl utils package release/src/
59 cp -r package release/bin
60 cp adtrack2 release/bin/
61 rm -f release/bin/techinfo.*
62
63 cd release; \
64 echo "which minor version is this? NOTE that i assume 2.4.xx and that you're on debian wheezy x86!"; \
65 read ver; \
66 mv src adtrack-2.4.$${ver}-linux-src; \
67 mv bin adtrack-2.4.$${ver}-linux-bin-debian-wheezy-x86; \
68 tar cvzf adtrack-2.4.$${ver}-linux-src.tar.gz adtrack-2.4.$${ver}-linux-src; \
69 tar cvzf adtrack-2.4.$${ver}-linux-bin-debian-wheezy-x86.tar.gz adtrack-2.4.$${ver}-linux-bin-debian-wheezy-x86;
70
71 .PHONY: mrproper
72 mrproper: clean
73 rm -rf bin/
74 mkdir bin/
75 rm -rf release/
76
77 $(TARGET): $(SOURCES)
78 fpc -O2 -XXs -Ccpascal -Mtp -Fusdl adtrack2.pas -oadtrack2
79
80 .PHONY: backup
81 backup: clean
82 find . -maxdepth 1 -type f -print0 | tar cfz `date +old/v%Y%m%d%H%M.tar.gz` --null -T -
83
84 .PHONY: fullbackup
85 fullbackup: clean
86 find . -path ./old -prune -o -type f -print0 | tar cfz `date +old/v%Y%m%d%H%M.tar.gz` --null -T -
87