]> bicyclesonthemoon.info Git - ott/enhance/blob - makefile
a2573740a423b0e8e8c1b0fca6f4bb8c688f7f94
[ott/enhance] / makefile
1 # "makefile" is automatically generated from "makefile.1.mak"
2 # 01.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    = release
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
31 CONFIGURE_CMD = $(PERL) $(CONFIGURE) $(CONFIGFILE)
32
33 CC   =gcc
34 CF   =-g -Wall
35 L_IL =-lIL
36 L_CGI=-lcgi
37
38 RM   =/usr/bin/rm
39
40 STANDALONE=\
41 nofading\
42 info\
43 bluenh\
44 reveal\
45 diff\
46 npb\
47 pal_mix\
48 pal_unmix\
49 remap_t_1
50
51 C_STANDALONE=\
52 standalone-nofading.c\
53 standalone-info.c\
54 standalone-bluenh.c\
55 standalone-reveal.c\
56 standalone-diff.c\
57 standalone-npb.c\
58 standalone-pal_mix.c\
59 standalone-pal_unmix.c\
60 standalone-remap_t_1.c
61
62 C_SUBTOOL=\
63 nofading.c\
64 info.c\
65 bluenh.c\
66 reveal.c\
67 diff.c\
68 npb.c\
69 pal_mix.c\
70 pal_unmix.c\
71 remap_t_1.c
72
73 H_SUBTOOL=\
74 nofading.h\
75 info.h\
76 bluenh.h\
77 reveal.h\
78 diff.h\
79 npb.h\
80 pal_mix.h\
81 pal_unmix.h\
82 remap_t_1.h
83
84 H_PNG=\
85 npb0.h\
86 npb1.h\
87 npb2.h\
88 npb_ong1.h\
89 npb_403.h
90
91 # keep these 2 lists in the same order!:
92 GENERATE_FROM=
93
94 TO_GENERATE=
95
96
97 #all: 403 npb npbd npb-ong1 npbd-ong1 bluenh bluenhd insert extract seediff insertframe mremapt-1 compare nofading nofadingd
98 all: enhance $(STANDALONE)
99
100
101 makefile: makefile.1.mak $(CONFIGFILE)
102         $(CONFIGURE_CMD) < makefile.1.mak > makefile 
103
104
105 enhance: enhance.c core.h core.c $(H_SUBTOOL) $(C_SUBTOOL) $(H_PNG)
106         $(CC) $(CF) -o enhance enhance.c core.c $(C_SUBTOOL) $(L_IL)
107
108 $(STANDALONE): %: standalone-%.c %.c %.h core.c core.h $(H_PNG)
109         $(CC) $(CF) -o $@ standalone-$*.c $*.c core.c $(L_IL)
110
111 $(C_STANDALONE): standalone-%.c: settings-subtool.txt standalone.c
112         $(CONFIGURE) subtool=$* settings-subtool.txt --in standalone.c --out $@
113
114 $(H_SUBTOOL): %.h: settings-subtool.txt subtool.h
115         $(CONFIGURE) subtool=$* settings-subtool.txt --in subtool.h --out $@
116
117 $(TO_GENERATE): $(GENERATE_FROM) $(CONFIGFILE)
118         $(CONFIGURE_CMD) --in $(GENERATE_FROM) --out $(TO_GENERATE)
119
120 $(H_PNG): %.h: %.png f2h
121         ./f2h $* $*.png $@
122
123 f2h: f2h.c
124         $(CC) $(CF) -o f2h f2h.c
125
126
127 #test: test.c core.h core.c
128 #       $(CC) $(CF) -o test test.c core.c $(LF)
129
130 clean:
131         $(RM) -f enhance $(C_STANDALONE) $(STANDALONE) $(TO_GENERATE) f2h $(H_PNG) $(H_SUBTOOL)
132
133 PHONY: all clean
134
135 #npbd-ong1: npb npbd-ong1.cpp makefile
136 #       $(CC) $(CF) -o npbd-ong1 npbd-ong1.cpp $(LF2)
137 #
138 #npbd: npb npbd.cpp makefile
139 #       $(CC) $(CF) -o npbd npbd.cpp $(LF2)
140 #
141 #bluenhd: bluenhd.cpp makefile
142 #       $(CC) $(CF) -o bluenhd bluenhd.cpp $(LF2)
143 #
144 #seediff: seediff.c makefile
145 #       $(CC) $(CF) $(LF) -o seediff seediff.c
146 #
147 #insertframe: insertframe.c makefile
148 #       $(CC) $(CF) -o insertframe insertframe.c $(LF2)
149 #
150 #remapt-1: remapt-1.c makefile
151 #       $(CC) $(CF) $(LF) -o remapt-1 remapt-1.c
152 #
153 #compare: compare.c makefile
154 #       $(CC) $(CF) $(LF) -o compare compare.c
155 #
156 #nofadingd: nofadingd.c makefile
157 #       $(CC) $(CF) $(LF) -o nofadingd nofadingd.c
158 #