]> bicyclesonthemoon.info Git - ott/enhance/blobdiff - makefile.1.mak
Partial CGI update bacause git disagrees with me.
[ott/enhance] / makefile.1.mak
index 7ec7196ea2b66450507646a32d28a96bff59d719..a66bd07d999e121800bf5a8616988178252c1b7a 100644 (file)
@@ -1,5 +1,5 @@
 # "makefile" is automatically generated from "makefile.1.mak"
-# 12.11.2022
+# 04.12.2022
 # 
 # Copyright (C) 2022  Balthasar SzczepaƄski
 # 
@@ -31,56 +31,132 @@ CONFIGURE = /botm/bin/config/configure.pl ###MAKE_CONFIGURE:
 CONFIGURE_CMD = $(PERL) $(CONFIGURE) $(CONFIGFILE)
 
 ###MAKE_CC:    CC=gcc
-###MAKE_CG:    CF=-g -Wall
+###MAKE_CF:    CF=-g -Wall
 ###MAKE_L_IL:  L_IL=-lIL
 ###MAKE_L_CGI: L_CGI=-lcgi
 
+###MAKE_RM:    RM    = rm
+
+STANDALONE=\
+nofading\
+info\
+bluenh\
+reveal\
+diff\
+npb\
+pal_mix\
+pal_unmix\
+pal_mixdiff\
+remap_t_1
+
+C_STANDALONE=\
+standalone-nofading.c\
+standalone-info.c\
+standalone-bluenh.c\
+standalone-reveal.c\
+standalone-diff.c\
+standalone-npb.c\
+standalone-pal_mix.c\
+standalone-pal_unmix.c\
+standalone-pal_mixdiff.c\
+standalone-remap_t_1.c
+
+C_SUBTOOL=\
+nofading.c\
+info.c\
+bluenh.c\
+reveal.c\
+diff.c\
+npb.c\
+pal_mix.c\
+pal_unmix.c\
+pal_mixdiff.c\
+remap_t_1.c
+
+H_SUBTOOL=\
+nofading.h\
+info.h\
+bluenh.h\
+reveal.h\
+diff.h\
+npb.h\
+pal_mix.h\
+pal_unmix.h\
+pal_mixdiff.h\
+remap_t_1.h
+
+H_PNG=\
+npb0.h\
+npb1.h\
+npb2.h\
+npb_ong1.h\
+npb_403.h\
+nh.h
+
+CGI=\
+bluenh-cgi
+
+#C_CGI=\
+#bluenh-cgi.c
+
+# keep these 2 lists in the same order!:
+GENERATE_FROM=\
+online-core.1.h
+
+TO_GENERATE=\
+online-core.h
+
+
 #all: 403 npb npbd npb-ong1 npbd-ong1 bluenh bluenhd insert extract seediff insertframe mremapt-1 compare nofading nofadingd
-all: enhance
+all: enhance $(STANDALONE) $(CGI)
 
 
 makefile: makefile.1.mak $(CONFIGFILE)
        $(CONFIGURE_CMD) < makefile.1.mak > makefile 
 
 
-enhance: enhance.c core.h core.c nofading.h nofading.c info.h info.c
-       $(CC) $(CF) -o enhance enhance.c core.c nofading.c info.c $(L_IL)
+enhance: enhance.c core.h core.c $(H_SUBTOOL) $(C_SUBTOOL) $(H_PNG)
+       $(CC) $(CF) -o enhance enhance.c core.c $(C_SUBTOOL) $(L_IL)
+
+$(STANDALONE): %: standalone-%.c %.c %.h core.c core.h $(H_PNG)
+       $(CC) $(CF) -o $@ standalone-$*.c $*.c core.c $(L_IL)
+
+$(C_STANDALONE): standalone-%.c: settings-subtool.txt standalone.c
+       $(CONFIGURE) subtool=$* settings-subtool.txt --in standalone.c --out $@
+
+$(H_SUBTOOL): %.h: settings-subtool.txt subtool.h
+       $(CONFIGURE) subtool=$* settings-subtool.txt --in subtool.h --out $@
+
+$(TO_GENERATE): $(GENERATE_FROM) $(CONFIGFILE)
+       $(CONFIGURE_CMD) --in $(GENERATE_FROM) --out $(TO_GENERATE)
+       
+$(CGI): %: %.c online-core.c online-core.h $(H_PNG)
+       $(CC) $(CF) -o $@ $*.c online-core.c $(L_CGI)
+
+$(H_PNG): %.h: %.png f2h
+       ./f2h $* $*.png $@
+
+f2h: f2h.c
+       $(CC) $(CF) -o f2h f2h.c
+
 
 #test: test.c core.h core.c
 #      $(CC) $(CF) -o test test.c core.c $(LF)
 
 clean:
-       rm enhance
+       $(RM) -f enhance $(C_STANDALONE) $(STANDALONE) $(TO_GENERATE) f2h $(H_PNG) $(H_SUBTOOL) $(CGI)
 
 PHONY: all clean
 
-#npb-ong1: npb-ong1.cpp makefile
-#      $(CC) $(CF) $(LF) -o npb-ong1 npb-ong1.cpp
-#
-#npb: npb.cpp makefile
-#      $(CC) $(CF) $(LF) -o npb npb.cpp
-#
-#403: 403.cpp makefile
-#      $(CC) $(CF) $(LF) -o 403 403.cpp
-#
 #npbd-ong1: npb npbd-ong1.cpp makefile
 #      $(CC) $(CF) -o npbd-ong1 npbd-ong1.cpp $(LF2)
 #
 #npbd: npb npbd.cpp makefile
 #      $(CC) $(CF) -o npbd npbd.cpp $(LF2)
 #
-#bluenh: bluenh.cpp makefile
-#      $(CC) $(CF) $(LF) -o bluenh bluenh.cpp
-#
 #bluenhd: bluenhd.cpp makefile
 #      $(CC) $(CF) -o bluenhd bluenhd.cpp $(LF2)
 #\r
-#insert: insert.c makefile\r
-#      $(CC) $(CF) $(LF) -o insert insert.c\r
-#\r
-#extract: extract.c makefile\r
-#      $(CC) $(CF) $(LF) -o extract extract.c\r
-#\r
 #seediff: seediff.c makefile\r
 #      $(CC) $(CF) $(LF) -o seediff seediff.c\r
 #\r
@@ -93,9 +169,6 @@ PHONY: all clean
 #compare: compare.c makefile
 #      $(CC) $(CF) $(LF) -o compare compare.c
 #
-#nofading: nofading.c makefile
-#      $(CC) $(CF) $(LF) -o nofading nofading.c
-#
 #nofadingd: nofadingd.c makefile
 #      $(CC) $(CF) $(LF) -o nofadingd nofadingd.c
 #
\ No newline at end of file