]> bicyclesonthemoon.info Git - ott/enhance/blobdiff - makefile
use config tool as submodule
[ott/enhance] / makefile
index 6fe317998cd410a159f80ae8313653c71330faef..15bf9ead81bf9eea60247707c63d5beecd687bb1 100644 (file)
--- a/makefile
+++ b/makefile
@@ -1,5 +1,5 @@
 # "makefile" is automatically generated from "makefile.1.mak"
-# 04.12.2022
+# 07.12.2022
 # 
 # Copyright (C) 2022  Balthasar SzczepaƄski
 # 
@@ -22,6 +22,7 @@ TARGET    = release
 # when want to change target run this first:
 # make -B TARGET=target_name makefile
 endif
+PERL = perl
 
 
 CC   =gcc
@@ -47,8 +48,8 @@ CONFIGFILE = settings-$(TARGET).txt settings.txt
 
 # The configuration tool
 # http://bicyclesonthemoon.info/git/botm-config 
-CONFIGURE = /botm/bin/config/configure.pl
-CONFIGURE_CMD = $(PERL) $(CONFIGURE) $(CONFIGFILE)
+CONFIGURE = $(PERL) ./configure.pl
+CONFIGURE_CMD = $(CONFIGURE) $(CONFIGFILE)
 
 
 STANDALONE=\
@@ -108,25 +109,38 @@ npb_403.h\
 nh.h\
 nf.h\
 rvl.h\
-df.h
+df.h\
+mpb.h\
+mpb_503.h\
+nclr.h\
+t1.h
 
 CGI=\
 bluenh-cgi\
 nofading-cgi\
 reveal-cgi\
-diff-cgi
+diff-cgi\
+npb-cgi\
+pal-cgi\
+t-1-cgi
 
 HTM_CGI=\
 bluenh.htm\
 nofading.htm\
 reveal.htm\
-diff.htm
+diff.htm\
+npb.htm\
+pal.htm\
+t-1.htm
 
 HTM_CGI_1=\
 bluenh.1.htm\
 nofading.1.htm\
 reveal.1.htm\
-diff.1.htm
+diff.1.htm\
+npb.1.htm\
+pal.1.htm\
+t-1.1.htm
 
 # keep these 2 lists in the same order!:
 GENERATE_FROM=\
@@ -155,13 +169,15 @@ index.htm\
 $(HTM_CGI)\
 param.png
 
-#all: 403 npb npbd npb-ong1 npbd-ong1 bluenh bluenhd insert extract seediff insertframe mremapt-1 compare nofading nofadingd
 all: $(BIN) $(WWW) enhance.conf
        
 
-makefile: makefile.1.mak $(CONFIGFILE)
+makefile: makefile.1.mak $(CONFIGFILE) configure.pl
        $(CONFIGURE_CMD) < makefile.1.mak > makefile 
 
+configure.pl: $(CONFIGFILE) config/configure.1.pl
+       $(PERL) config/configure.1.pl target=direct settings-$(TARGET).txt config/settings.txt --in config/configure.1.pl --out configure.pl
+
 
 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)
@@ -169,13 +185,13 @@ enhance: enhance.c core.h core.c $(H_SUBTOOL) $(C_SUBTOOL) $(H_PNG)
 $(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
+$(C_STANDALONE): standalone-%.c: settings-subtool.txt standalone.c configure.pl
        $(CONFIGURE) subtool=$* settings-subtool.txt --in standalone.c --out $@
 
-$(H_SUBTOOL): %.h: settings-subtool.txt subtool.h
+$(H_SUBTOOL): %.h: settings-subtool.txt subtool.h configure.pl
        $(CONFIGURE) subtool=$* settings-subtool.txt --in subtool.h --out $@
 
-$(TO_GENERATE): $(GENERATE_FROM) $(CONFIGFILE)
+$(TO_GENERATE): $(GENERATE_FROM) $(CONFIGFILE)  configure.pl
        $(CONFIGURE_CMD) --in $(GENERATE_FROM) --out $(TO_GENERATE)
        
 $(CGI): %: %.c online-core.c online-core.h $(H_PNG)
@@ -187,10 +203,10 @@ $(H_PNG): %.h: %.png f2h
 f2h: f2h.c
        $(CC) $(CF) -o f2h f2h.c
 
-$(HTM_CGI): %.htm: enhance-top.htm enhance-bottom.htm %.1.htm $(CONFIGFILE)
+$(HTM_CGI): %.htm: enhance-top.htm enhance-bottom.htm %.1.htm $(CONFIGFILE) configure.pl
        $(CAT) enhance-top.htm $*.1.htm enhance-bottom.htm | $(CONFIGURE) _HTML_TITLE=\$$title_$* $(CONFIGFILE) > $*.htm
 
-index.htm: enhance-top.htm enhance-bottom.htm $(HTM_CGI_1) $(CONFIGFILE)
+index.htm: enhance-top.htm enhance-bottom.htm $(HTM_CGI_1) $(CONFIGFILE) configure.pl
        $(CAT) enhance-top.htm $(HTM_CGI_1) enhance-bottom.htm | $(CONFIGURE) _HTML_TITLE=\$$title_enhance $(CONFIGFILE) > index.htm
 
 
@@ -203,7 +219,7 @@ mktree:
 
 ifdef BIN_PATH
 cp_bin: $(BIN) setuid | mktree
-       $(RM) -rf $(BIN_PATH)/*
+       $(RM) -f $(BIN_PATH)/*
        $(CP) -p $(BIN) $(BIN_PATH)
 endif
 
@@ -213,34 +229,12 @@ cp_conf: enhance.conf
 cp_www: $(WWW) | mktree
        $(CP) -r $(WWW) $(WWW_PATH)
 
-install: cp_bin cp_www cp_conf
+install: all cp_bin cp_www cp_conf
 
 clean:
-       $(RM) -f enhance $(C_STANDALONE) $(STANDALONE) $(TO_GENERATE) f2h $(H_PNG) $(H_SUBTOOL) $(CGI) index.htm $(HTM_CGI)
+       $(RM) -f enhance configure.pl $(C_STANDALONE) $(STANDALONE) $(TO_GENERATE) f2h $(H_PNG) $(H_SUBTOOL) $(CGI) index.htm $(HTM_CGI)
 
 PHONY: all clean install setuid mktree cp_bin cp_www
 
-#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)
-#
-#bluenhd: bluenhd.cpp makefile
-#      $(CC) $(CF) -o bluenhd bluenhd.cpp $(LF2)
-#
-#seediff: seediff.c makefile
-#      $(CC) $(CF) $(LF) -o seediff seediff.c
-#
-#insertframe: insertframe.c makefile
-#      $(CC) $(CF) -o insertframe insertframe.c $(LF2)
-#
-#remapt-1: remapt-1.c makefile
-#      $(CC) $(CF) $(LF) -o remapt-1 remapt-1.c
-#
 #compare: compare.c makefile
 #      $(CC) $(CF) $(LF) -o compare compare.c
-#
-#nofadingd: nofadingd.c makefile
-#      $(CC) $(CF) $(LF) -o nofadingd nofadingd.c
-#