-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMAKEFILE
77 lines (60 loc) · 2.13 KB
/
MAKEFILE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
############################################
# Makefile for Bayer Matrix Generator repo #
############################################
pc=tmtpc # set your compiler here, default is TMT
# . tpc for Turbo Pascal
# . tmtpc for TMT Pascal
# . fpc for Free Pascal
rm=del # file remover
inc=include # where the include files are
tex=textures # textures folder
t_bayer=bayer # our 3 tools
t_dither=dither
t_gentex=gentex
all: $(t_bayer).exe $(t_dither).exe $(t_gentex).exe
$(t_bayer).exe: $(t_bayer).pas \
$(inc)\common.inc \
$(inc)\bayer.inc \
$(inc)\bitmap.inc
# build the generator
@$(pc) $(t_bayer).pas
# cleanup
@if exist $(t_bayer).sym $(rm) $(t_bayer).sym
@if exist $(t_bayer).fpd $(rm) $(t_bayer).fpd
@if exist $(t_bayer).o $(rm) $(t_bayer).o
$(t_dither).exe: $(t_dither).pas \
$(t_bayer).exe \
$(inc)\common.inc \
$(inc)\bitmap.inc
# generate a level 3 Bayer matrix
@$(t_bayer).exe include\matrix.inc 3
# build the test drive program
@$(pc) $(t_dither).pas
# cleaning up
@if exist $(t_dither).sym $(rm) $(t_dither).sym
@if exist $(t_dither).fpd $(rm) $(t_dither).fpd
@if exist $(t_dither).o $(rm) $(t_dither).o
$(t_gentex).exe: $(inc)\common.inc \
$(inc)\bitmap.inc \
$(inc)\bayer.inc
# build the texture generator program
@$(pc) $(t_gentex).pas
# cleaning up
@if exist $(t_gentex).sym $(rm) $(t_gentex).sym
@if exist $(t_gentex).fpd $(rm) $(t_gentex).fpd
@if exist $(t_gentex).o $(rm) $(t_gentex).o
clean: # clean all previous builds
@if exist $(t_bayer).exe $(rm) $(t_bayer).exe
@if exist $(t_dither).exe $(rm) $(t_dither).exe
@if exist $(t_gentex).exe $(rm) $(t_gentex).exe
@if exist $(t_bayer).sym $(rm) $(t_bayer).sym
@if exist $(t_bayer).fpd $(rm) $(t_bayer).fpd
@if exist $(t_bayer).o $(rm) $(t_bayer).o
@if exist $(t_dither).sym $(rm) $(t_dither).sym
@if exist $(t_dither).fpd $(rm) $(t_dither).fpd
@if exist $(t_dither).o $(rm) $(t_dither).o
@if exist $(t_gentex).sym $(rm) $(t_gentex).sym
@if exist $(t_gentex).fpd $(rm) $(t_gentex).fpd
@if exist $(t_gentex).o $(rm) $(t_gentex).o
@if exist $(tex)\nul $(rm) $(tex)\*.*
@if exist $(tex)\nul rd $(tex)\