]> bicyclesonthemoon.info Git - ott/enhance/blob - makefile.1.mak
new palette mix tool is done but needs debug
[ott/enhance] / makefile.1.mak
1 # "makefile" is automatically generated from "makefile.1.mak"
2 # 30.11.2022
3
4 # Copyright (C) 2022  Balthasar SzczepaƄski
5
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU Affero General Public License as
8 # published by the Free Software Foundation, either version 3 of the
9 # License, or (at your option) any later version.
10
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU Affero General Public License for more details.
15
16 # You should have received a copy of the GNU Affero General Public License
17 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
18
19
20 ifndef TARGET
21 TARGET = debug ###MAKE_TARGET:
22 # when want to change target run this first:
23 # make -B TARGET=target_name makefile
24 endif
25
26 CONFIGFILE = settings-$(TARGET).txt settings.txt
27
28 # The configuration tool
29 # http://bicyclesonthemoon.info/git/botm-config 
30 CONFIGURE = /botm/bin/config/configure.pl ###MAKE_CONFIGURE:
31 CONFIGURE_CMD = $(PERL) $(CONFIGURE) $(CONFIGFILE)
32
33 ###MAKE_CC:    CC=gcc
34 ###MAKE_CF:    CF=-g -Wall
35 ###MAKE_L_IL:  L_IL=-lIL
36 ###MAKE_L_CGI: L_CGI=-lcgi
37
38 ###MAKE_RM:    RM    = rm
39
40 STANDALONE=\
41 nofading\
42 info\
43 bluenh\
44 reveal\
45 diff\
46 npb\
47 pal_mix
48
49 C_STANDALONE=\
50 standalone-nofading.c\
51 standalone-info.c\
52 standalone-bluenh.c\
53 standalone-reveal.c\
54 standalone-diff.c\
55 standalone-npb.c\
56 standalone-pal_mix.c
57
58 C_SUBTOOL=\
59 nofading.c\
60 info.c\
61 bluenh.c\
62 reveal.c\
63 diff.c\
64 npb.c\
65 pal_mix.c
66
67 H_SUBTOOL=\
68 nofading.h\
69 info.h\
70 bluenh.h\
71 reveal.h\
72 diff.h\
73 npb.h\
74 pal_mix.h
75
76 H_PNG=\
77 npb0.h\
78 npb1.h\
79 npb2.h\
80 npb_ong1.h\
81 npb_403.h
82
83 # keep these 2 lists in the same order!:
84 GENERATE_FROM=
85
86 TO_GENERATE=
87
88
89
90 #all: 403 npb npbd npb-ong1 npbd-ong1 bluenh bluenhd insert extract seediff insertframe mremapt-1 compare nofading nofadingd
91 all: enhance $(STANDALONE)
92
93
94 makefile: makefile.1.mak $(CONFIGFILE)
95         $(CONFIGURE_CMD) < makefile.1.mak > makefile 
96
97
98 enhance: enhance.c core.h core.c $(H_SUBTOOL) $(C_SUBTOOL) $(H_PNG)
99         $(CC) $(CF) -o enhance enhance.c core.c $(C_SUBTOOL) $(L_IL)
100
101 $(STANDALONE): %: standalone-%.c %.c %.h core.c core.h $(H_PNG)
102         $(CC) $(CF) -o $@ standalone-$*.c $*.c core.c $(L_IL)
103
104 $(C_STANDALONE): standalone-%.c: settings-standalone.txt standalone.c
105         $(CONFIGURE) subtool=$* settings-standalone.txt --in standalone.c --out $@
106
107 $(TO_GENERATE): $(GENERATE_FROM) $(CONFIGFILE)
108         $(CONFIGURE_CMD) --in $(GENERATE_FROM) --out $(TO_GENERATE)
109
110 $(H_PNG): %.h: %.png f2h
111         ./f2h $* $*.png $@
112
113 f2h: f2h.c
114         $(CC) $(CF) -o f2h f2h.c
115
116
117 #test: test.c core.h core.c
118 #       $(CC) $(CF) -o test test.c core.c $(LF)
119
120 clean:
121         $(RM) -f enhance $(C_STANDALONE) $(STANDALONE) $(TO_GENERATE) f2h $(H_PNG)
122
123 PHONY: all clean
124
125 #npb-ong1: npb-ong1.cpp makefile
126 #       $(CC) $(CF) $(LF) -o npb-ong1 npb-ong1.cpp
127 #
128 #npb: npb.cpp makefile
129 #       $(CC) $(CF) $(LF) -o npb npb.cpp
130 #
131 #403: 403.cpp makefile
132 #       $(CC) $(CF) $(LF) -o 403 403.cpp
133 #
134 #npbd-ong1: npb npbd-ong1.cpp makefile
135 #       $(CC) $(CF) -o npbd-ong1 npbd-ong1.cpp $(LF2)
136 #
137 #npbd: npb npbd.cpp makefile
138 #       $(CC) $(CF) -o npbd npbd.cpp $(LF2)
139 #
140 #bluenh: bluenh.cpp makefile
141 #       $(CC) $(CF) $(LF) -o bluenh bluenh.cpp
142 #
143 #bluenhd: bluenhd.cpp makefile
144 #       $(CC) $(CF) -o bluenhd bluenhd.cpp $(LF2)
145 #\r
146 #insert: insert.c makefile\r
147 #       $(CC) $(CF) $(LF) -o insert insert.c\r
148 #\r
149 #extract: extract.c makefile\r
150 #       $(CC) $(CF) $(LF) -o extract extract.c\r
151 #\r
152 #seediff: seediff.c makefile\r
153 #       $(CC) $(CF) $(LF) -o seediff seediff.c\r
154 #\r
155 #insertframe: insertframe.c makefile\r
156 #       $(CC) $(CF) -o insertframe insertframe.c $(LF2)\r
157 #
158 #remapt-1: remapt-1.c makefile
159 #       $(CC) $(CF) $(LF) -o remapt-1 remapt-1.c
160 #
161 #compare: compare.c makefile
162 #       $(CC) $(CF) $(LF) -o compare compare.c
163 #
164 #nofading: nofading.c makefile
165 #       $(CC) $(CF) $(LF) -o nofading nofading.c
166 #
167 #nofadingd: nofadingd.c makefile
168 #       $(CC) $(CF) $(LF) -o nofadingd nofadingd.c
169 #