From: b Date: Sat, 12 Nov 2022 23:25:44 +0000 (+0000) Subject: make & generate X-Git-Url: http://bicyclesonthemoon.info/git-projects/?a=commitdiff_plain;h=e16b64f43053847d401453378f6d07e0515bcf35;p=ott%2Fenhance make & generate --- diff --git a/mem/npb-ong1.png b/data/npb-ong1.png similarity index 100% rename from mem/npb-ong1.png rename to data/npb-ong1.png diff --git a/makefile b/makefile index aab5b13..b3d7803 100644 --- a/makefile +++ b/makefile @@ -1,13 +1,50 @@ -CC=gcc -CF=-g -Wall -LF=-lIL -#LF2=-lcgi +# "makefile" is automatically generated from "makefile.1.mak" +# 12.11.2022 +# +# Copyright (C) 2022 Balthasar Szczepański +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + + +ifndef TARGET +TARGET = release +# when want to change target run this first: +# make -B TARGET=target_name makefile +endif + +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) + +CC =gcc +###MAKE_CG: CF=-g -Wall +L_IL =-lIL +L_CGI=-lcgi #all: 403 npb npbd npb-ong1 npbd-ong1 bluenh bluenhd insert extract seediff insertframe mremapt-1 compare nofading nofadingd all: enhance + +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 $(LF) + $(CC) $(CF) -o enhance enhance.c core.c nofading.c info.c $(L_IL) #test: test.c core.h core.c # $(CC) $(CF) -o test test.c core.c $(LF) @@ -37,18 +74,18 @@ PHONY: all clean # #bluenhd: bluenhd.cpp makefile # $(CC) $(CF) -o bluenhd bluenhd.cpp $(LF2) -# -#insert: insert.c makefile -# $(CC) $(CF) $(LF) -o insert insert.c -# -#extract: extract.c makefile -# $(CC) $(CF) $(LF) -o extract extract.c -# -#seediff: seediff.c makefile -# $(CC) $(CF) $(LF) -o seediff seediff.c -# -#insertframe: insertframe.c makefile -# $(CC) $(CF) -o insertframe insertframe.c $(LF2) +# +#insert: insert.c makefile +# $(CC) $(CF) $(LF) -o insert insert.c +# +#extract: extract.c makefile +# $(CC) $(CF) $(LF) -o extract extract.c +# +#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 @@ -61,4 +98,4 @@ PHONY: all clean # #nofadingd: nofadingd.c makefile # $(CC) $(CF) $(LF) -o nofadingd nofadingd.c -# \ No newline at end of file +# diff --git a/makefile.1.mak b/makefile.1.mak new file mode 100644 index 0000000..7ec7196 --- /dev/null +++ b/makefile.1.mak @@ -0,0 +1,101 @@ +# "makefile" is automatically generated from "makefile.1.mak" +# 12.11.2022 +# +# Copyright (C) 2022 Balthasar Szczepański +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + + +ifndef TARGET +TARGET = debug ###MAKE_TARGET: +# when want to change target run this first: +# make -B TARGET=target_name makefile +endif + +CONFIGFILE = settings-$(TARGET).txt settings.txt + +# The configuration tool +# http://bicyclesonthemoon.info/git/botm-config +CONFIGURE = /botm/bin/config/configure.pl ###MAKE_CONFIGURE: +CONFIGURE_CMD = $(PERL) $(CONFIGURE) $(CONFIGFILE) + +###MAKE_CC: CC=gcc +###MAKE_CG: CF=-g -Wall +###MAKE_L_IL: L_IL=-lIL +###MAKE_L_CGI: L_CGI=-lcgi + +#all: 403 npb npbd npb-ong1 npbd-ong1 bluenh bluenhd insert extract seediff insertframe mremapt-1 compare nofading nofadingd +all: enhance + + +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) + +#test: test.c core.h core.c +# $(CC) $(CF) -o test test.c core.c $(LF) + +clean: + rm enhance + +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) +# +#insert: insert.c makefile +# $(CC) $(CF) $(LF) -o insert insert.c +# +#extract: extract.c makefile +# $(CC) $(CF) $(LF) -o extract extract.c +# +#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 +# +#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 diff --git a/nofading.c b/nofading.c index 803a1f5..f5b990c 100644 --- a/nofading.c +++ b/nofading.c @@ -65,13 +65,13 @@ ILuint enhance_fading_1ch (ILuint val, ILuint low, ILuint high, ILuint max); int find_fading_range (ILuint n, struct PixelInfo *p, void *data); int enhance_fading (ILuint n, struct PixelInfo *p, void *data); -main_nofading (int argc, char **argv) +int main_nofading (int argc, char **argv) { int r; char *error_text = NO_STR; r = init(); - if r(!=0) + if (r!=0) finish(r, INIT_FAILED); r = subtool_nofading(argc, argv, 1, &error_text); diff --git a/settings-release.txt b/settings-release.txt new file mode 100644 index 0000000..128f446 --- /dev/null +++ b/settings-release.txt @@ -0,0 +1,18 @@ +# Name must be unique, not shared with other projects / targets. +# otherwise config files will collide +name: enhance + +# target name. settings file (THIS FILE) is "settings-TARGET_NAME.txt" +# where TARGET_NAME is the value +target: release + +# The configuration tool +# http://bicyclesonthemoon.info/git/botm-config +# alternatively, copy configure.pl to source directory. +configure: /botm/bin/config/configure.pl + + +CC: gcc +CF: -g -Wall +L_IL: -lIL +L_CGI: -lcgi diff --git a/settings.txt b/settings.txt new file mode 100644 index 0000000..673e960 --- /dev/null +++ b/settings.txt @@ -0,0 +1,27 @@ +# setting.txt +# 12.11.2022 +# +# Copyright (C) 2022 Balthasar Szczepański +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + + +MAKE_CONFIGURE = CONFIGURE = $configure +MAKE_TARGET = TARGET = $target + +MAKE_CC = CC =$CC +MAKE_CF = CF =$CF +MAKE_L_IL = L_IL =$L_IL +MAKE_L_CGI = L_CGI=$L_CGI +