]> bicyclesonthemoon.info Git - ott/enhance/blobdiff - makefile
Fully working online interface; for now bluenh only.
[ott/enhance] / makefile
index 4c96e89b4c3d0eff1c83f0cea869a343a00b8c84..5d6ad886afacf4d7f0a264379b7d21a1eb346566 100644 (file)
--- a/makefile
+++ b/makefile
@@ -29,6 +29,7 @@ CF   =-g -Wall
 L_IL =-lIL
 L_CGI=-lcgi
 
+CAT  =/usr/bin/cat
 CHMOD=/usr/bin/chmod
 CP   =/usr/bin/cp
 MKDIR=/usr/bin/mkdir
@@ -37,6 +38,9 @@ RM   =/usr/bin/rm
 
 BIN_PATH = /botm/bin/enhance
 TMP_PATH = /botm/tmp/enhance
+WWW_PATH = /botm/www/1190/enhance
+
+CONF = /botm/etc/www/conf/1190/enhance.conf
 
 
 CONFIGFILE = settings-$(TARGET).txt settings.txt
@@ -106,20 +110,26 @@ nh.h
 CGI=\
 bluenh-cgi
 
-#C_CGI=\
-#bluenh-cgi.c
+HTM_CGI=\
+bluenh.htm
+
+HTM_CGI_1=\
+bluenh.1.htm
 
 
 # keep these 2 lists in the same order!:
 GENERATE_FROM=\
-online-core.1.h
+online-core.1.h\
+enhance.1.conf
 
 TO_GENERATE=\
-online-core.h
+online-core.h\
+enhance.conf
 
 DIR=\
 $(BIN_PATH)\
-$(TMP_PATH)
+$(TMP_PATH)\
+$(WWW_PATH)
 
 SETUID=\
 $(CGI)
@@ -129,9 +139,13 @@ enhance\
 $(STANDALONE)\
 $(CGI)
 
+WWW=\
+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)
+all: $(BIN) $(WWW)
        
 
 makefile: makefile.1.mak $(CONFIGFILE)
@@ -162,6 +176,12 @@ $(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)
+       $(CAT) enhance-top.htm $*.1.htm enhance-bottom.htm | $(CONFIGURE) _HTML_TITLE=\$$title_$* $(CONFIGFILE) > bluenh.htm
+
+index.htm: enhance-top.htm enhance-bottom.htm $(HTM_CGI_1) $(CONFIGFILE)
+       $(CAT) enhance-top.htm $(HTM_CGI_1) enhance-bottom.htm | $(CONFIGURE) _HTML_TITLE=\$$title_enhance $(CONFIGFILE) > index.htm
+
 
 setuid: $(SETUID)
        $(CHMOD) u+s,g+s $(SETUID)
@@ -176,12 +196,18 @@ cp_bin: $(BIN) setuid | mktree
        $(CP) -p $(BIN) $(BIN_PATH)
 endif
 
-install: cp_bin
+cp_conf: enhance.conf
+       $(CP) enhance.conf $(CONF)
+
+cp_www: $(WWW) | mktree
+       $(CP) -r $(WWW) $(WWW_PATH)
+
+install: cp_bin cp_www cp_conf
 
 clean:
-       $(RM) -f enhance $(C_STANDALONE) $(STANDALONE) $(TO_GENERATE) f2h $(H_PNG) $(H_SUBTOOL) $(CGI)
+       $(RM) -f enhance $(C_STANDALONE) $(STANDALONE) $(TO_GENERATE) f2h $(H_PNG) $(H_SUBTOOL) $(CGI) index.htm $(HTM_CGI)
 
-PHONY: all clean install setuid mktree cp_bin 
+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)