1 # "makefile" is automatically generated from "makefile.1.mak"
4 # Copyright (C) 2022 Balthasar SzczepaĆski
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.
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.
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/>.
21 TARGET = debug ###MAKE_TARGET:
22 # when want to change target run this first:
23 # make -B TARGET=target_name makefile
28 ###MAKE_CF: CF=-g -Wall
29 ###MAKE_L_IL: L_IL=-lIL
30 ###MAKE_L_CGI: L_CGI=-lcgi
32 ###MAKE_CAT: CAT = cat
33 ###MAKE_CHMOD: CHMOD = chmod
35 ###MAKE_MKDIR: MKDIR = mkdir
36 ###MAKE_PERL: PERL = perl
39 ###MAKE_BIN_PATH: BIN_PATH = /botm/bin/enhance
40 ###MAKE_TMP_PATH: TMP_PATH = /botm/tmp/enhance
41 ###MAKE_WWW_PATH: WWW_PATH = /botm/www/1190/enhance
43 ###MAKE_CONF: CONF = /botm/etc/www/conf/1190/enhance.conf
46 CONFIGFILE = settings-$(TARGET).txt settings.txt
48 # The configuration tool
49 # http://bicyclesonthemoon.info/git/botm-config
50 CONFIGURE = /botm/bin/config/configure.pl ###MAKE_CONFIGURE:
51 CONFIGURE_CMD = $(PERL) $(CONFIGURE) $(CONFIGFILE)
67 standalone-nofading.c\
74 standalone-pal_unmix.c\
75 standalone-pal_mixdiff.c\
76 standalone-remap_t_1.c
124 # keep these 2 lists in the same order!:
151 #all: 403 npb npbd npb-ong1 npbd-ong1 bluenh bluenhd insert extract seediff insertframe mremapt-1 compare nofading nofadingd
155 makefile: makefile.1.mak $(CONFIGFILE)
156 $(CONFIGURE_CMD) < makefile.1.mak > makefile
159 enhance: enhance.c core.h core.c $(H_SUBTOOL) $(C_SUBTOOL) $(H_PNG)
160 $(CC) $(CF) -o enhance enhance.c core.c $(C_SUBTOOL) $(L_IL)
162 $(STANDALONE): %: standalone-%.c %.c %.h core.c core.h $(H_PNG)
163 $(CC) $(CF) -o $@ standalone-$*.c $*.c core.c $(L_IL)
165 $(C_STANDALONE): standalone-%.c: settings-subtool.txt standalone.c
166 $(CONFIGURE) subtool=$* settings-subtool.txt --in standalone.c --out $@
168 $(H_SUBTOOL): %.h: settings-subtool.txt subtool.h
169 $(CONFIGURE) subtool=$* settings-subtool.txt --in subtool.h --out $@
171 $(TO_GENERATE): $(GENERATE_FROM) $(CONFIGFILE)
172 $(CONFIGURE_CMD) --in $(GENERATE_FROM) --out $(TO_GENERATE)
174 $(CGI): %: %.c online-core.c online-core.h $(H_PNG)
175 $(CC) $(CF) -o $@ $*.c online-core.c $(L_CGI)
177 $(H_PNG): %.h: %.png f2h
181 $(CC) $(CF) -o f2h f2h.c
183 $(HTM_CGI): %.htm: enhance-top.htm enhance-bottom.htm %.1.htm $(CONFIGFILE)
184 $(CAT) enhance-top.htm $*.1.htm enhance-bottom.htm | $(CONFIGURE) _HTML_TITLE=\$$title_$* $(CONFIGFILE) > $*.htm
186 index.htm: enhance-top.htm enhance-bottom.htm $(HTM_CGI_1) $(CONFIGFILE)
187 $(CAT) enhance-top.htm $(HTM_CGI_1) enhance-bottom.htm | $(CONFIGURE) _HTML_TITLE=\$$title_enhance $(CONFIGFILE) > index.htm
191 $(CHMOD) u+s,g+s $(SETUID)
195 # $(CHMOD) g-r,g-w,g-x,o-r,o-w,o-x $(HIDDEN_DIR)
198 cp_bin: $(BIN) setuid | mktree
199 $(RM) -rf $(BIN_PATH)/*
200 $(CP) -p $(BIN) $(BIN_PATH)
203 cp_conf: enhance.conf
204 $(CP) enhance.conf $(CONF)
206 cp_www: $(WWW) | mktree
207 $(CP) -r $(WWW) $(WWW_PATH)
209 install: cp_bin cp_www cp_conf
212 $(RM) -f enhance $(C_STANDALONE) $(STANDALONE) $(TO_GENERATE) f2h $(H_PNG) $(H_SUBTOOL) $(CGI) index.htm $(HTM_CGI)
214 PHONY: all clean install setuid mktree cp_bin cp_www
216 #npbd-ong1: npb npbd-ong1.cpp makefile
217 # $(CC) $(CF) -o npbd-ong1 npbd-ong1.cpp $(LF2)
219 #npbd: npb npbd.cpp makefile
220 # $(CC) $(CF) -o npbd npbd.cpp $(LF2)
222 #bluenhd: bluenhd.cpp makefile
223 # $(CC) $(CF) -o bluenhd bluenhd.cpp $(LF2)
225 #seediff: seediff.c makefile
\r
226 # $(CC) $(CF) $(LF) -o seediff seediff.c
\r
228 #insertframe: insertframe.c makefile
\r
229 # $(CC) $(CF) -o insertframe insertframe.c $(LF2)
\r
231 #remapt-1: remapt-1.c makefile
232 # $(CC) $(CF) $(LF) -o remapt-1 remapt-1.c
234 #compare: compare.c makefile
235 # $(CC) $(CF) $(LF) -o compare compare.c
237 #nofadingd: nofadingd.c makefile
238 # $(CC) $(CF) $(LF) -o nofadingd nofadingd.c