]> bicyclesonthemoon.info Git - ott/enhance/blob - makefile.1.mak
Partial CGI update bacause git disagrees with me.
[ott/enhance] / makefile.1.mak
1 # "makefile" is automatically generated from "makefile.1.mak"
2 # 04.12.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 pal_unmix\
49 pal_mixdiff\
50 remap_t_1
51
52 C_STANDALONE=\
53 standalone-nofading.c\
54 standalone-info.c\
55 standalone-bluenh.c\
56 standalone-reveal.c\
57 standalone-diff.c\
58 standalone-npb.c\
59 standalone-pal_mix.c\
60 standalone-pal_unmix.c\
61 standalone-pal_mixdiff.c\
62 standalone-remap_t_1.c
63
64 C_SUBTOOL=\
65 nofading.c\
66 info.c\
67 bluenh.c\
68 reveal.c\
69 diff.c\
70 npb.c\
71 pal_mix.c\
72 pal_unmix.c\
73 pal_mixdiff.c\
74 remap_t_1.c
75
76 H_SUBTOOL=\
77 nofading.h\
78 info.h\
79 bluenh.h\
80 reveal.h\
81 diff.h\
82 npb.h\
83 pal_mix.h\
84 pal_unmix.h\
85 pal_mixdiff.h\
86 remap_t_1.h
87
88 H_PNG=\
89 npb0.h\
90 npb1.h\
91 npb2.h\
92 npb_ong1.h\
93 npb_403.h\
94 nh.h
95
96 CGI=\
97 bluenh-cgi
98
99 #C_CGI=\
100 #bluenh-cgi.c
101
102 # keep these 2 lists in the same order!:
103 GENERATE_FROM=\
104 online-core.1.h
105
106 TO_GENERATE=\
107 online-core.h
108
109
110 #all: 403 npb npbd npb-ong1 npbd-ong1 bluenh bluenhd insert extract seediff insertframe mremapt-1 compare nofading nofadingd
111 all: enhance $(STANDALONE) $(CGI)
112
113
114 makefile: makefile.1.mak $(CONFIGFILE)
115         $(CONFIGURE_CMD) < makefile.1.mak > makefile 
116
117
118 enhance: enhance.c core.h core.c $(H_SUBTOOL) $(C_SUBTOOL) $(H_PNG)
119         $(CC) $(CF) -o enhance enhance.c core.c $(C_SUBTOOL) $(L_IL)
120
121 $(STANDALONE): %: standalone-%.c %.c %.h core.c core.h $(H_PNG)
122         $(CC) $(CF) -o $@ standalone-$*.c $*.c core.c $(L_IL)
123
124 $(C_STANDALONE): standalone-%.c: settings-subtool.txt standalone.c
125         $(CONFIGURE) subtool=$* settings-subtool.txt --in standalone.c --out $@
126
127 $(H_SUBTOOL): %.h: settings-subtool.txt subtool.h
128         $(CONFIGURE) subtool=$* settings-subtool.txt --in subtool.h --out $@
129
130 $(TO_GENERATE): $(GENERATE_FROM) $(CONFIGFILE)
131         $(CONFIGURE_CMD) --in $(GENERATE_FROM) --out $(TO_GENERATE)
132         
133 $(CGI): %: %.c online-core.c online-core.h $(H_PNG)
134         $(CC) $(CF) -o $@ $*.c online-core.c $(L_CGI)
135
136 $(H_PNG): %.h: %.png f2h
137         ./f2h $* $*.png $@
138
139 f2h: f2h.c
140         $(CC) $(CF) -o f2h f2h.c
141
142
143 #test: test.c core.h core.c
144 #       $(CC) $(CF) -o test test.c core.c $(LF)
145
146 clean:
147         $(RM) -f enhance $(C_STANDALONE) $(STANDALONE) $(TO_GENERATE) f2h $(H_PNG) $(H_SUBTOOL) $(CGI)
148
149 PHONY: all clean
150
151 #npbd-ong1: npb npbd-ong1.cpp makefile
152 #       $(CC) $(CF) -o npbd-ong1 npbd-ong1.cpp $(LF2)
153 #
154 #npbd: npb npbd.cpp makefile
155 #       $(CC) $(CF) -o npbd npbd.cpp $(LF2)
156 #
157 #bluenhd: bluenhd.cpp makefile
158 #       $(CC) $(CF) -o bluenhd bluenhd.cpp $(LF2)
159 #\r
160 #seediff: seediff.c makefile\r
161 #       $(CC) $(CF) $(LF) -o seediff seediff.c\r
162 #\r
163 #insertframe: insertframe.c makefile\r
164 #       $(CC) $(CF) -o insertframe insertframe.c $(LF2)\r
165 #
166 #remapt-1: remapt-1.c makefile
167 #       $(CC) $(CF) $(LF) -o remapt-1 remapt-1.c
168 #
169 #compare: compare.c makefile
170 #       $(CC) $(CF) $(LF) -o compare compare.c
171 #
172 #nofadingd: nofadingd.c makefile
173 #       $(CC) $(CF) $(LF) -o nofadingd nofadingd.c
174 #