diff options
author | Aki <please@ignore.pl> | 2021-10-01 23:46:47 +0200 |
---|---|---|
committer | Aki <please@ignore.pl> | 2021-10-01 23:46:47 +0200 |
commit | ddd76aa4e1571c8d5965709db5c3cd47a89c9a38 (patch) | |
tree | 4e07bfaebede6531a70984fdebc855bca52f394a /libpng/scripts/pnglibconf.mak | |
parent | 3a507e08b1d4e5970b27401a7e6517570d529400 (diff) | |
parent | c2d2c3551501110fddd78674d5435bfaa70382a3 (diff) | |
download | starshatter-ddd76aa4e1571c8d5965709db5c3cd47a89c9a38.zip starshatter-ddd76aa4e1571c8d5965709db5c3cd47a89c9a38.tar.gz starshatter-ddd76aa4e1571c8d5965709db5c3cd47a89c9a38.tar.bz2 |
Project is now built with CMake
Diffstat (limited to 'libpng/scripts/pnglibconf.mak')
-rwxr-xr-x | libpng/scripts/pnglibconf.mak | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/libpng/scripts/pnglibconf.mak b/libpng/scripts/pnglibconf.mak new file mode 100755 index 0000000..bced8d3 --- /dev/null +++ b/libpng/scripts/pnglibconf.mak @@ -0,0 +1,55 @@ +#!/usr/bin/make -f +# pnglibconf.mak - standard make lines for pnglibconf.h +# +# These lines are copied from Makefile.am, they illustrate +# how to automate the build of pnglibconf.h from scripts/pnglibconf.dfa +# given 'awk' and 'sed' + +# Override as appropriate, these definitions can be overridden on +# the make command line (AWK='nawk' for example). +AWK = gawk +AWK = mawk +AWK = nawk +AWK = one-true-awk +AWK = awk # Crashes on SunOS 5.10 - use 'nawk' +SED = sed +CPP = $(CC) -E +COPY = cp +DELETE = rm -f +ECHO = echo +DFA_XTRA = # Appended to scripts/options.awk + +# CPPFLAGS should contain the options to control the result, +# but DEFS and CFLAGS are also supported here, override +# as appropriate +DFNFLAGS = $(DEFS) $(CPPFLAGS) $(CFLAGS) + +# srcdir is a defacto standard for the location of the source +srcdir = . + +# The standard pnglibconf.h exists as scripts/pnglibconf.h.prebuilt, +# copy this if the following doesn't work. +pnglibconf.h: pnglibconf.dfn + $(DELETE) $@ dfn.c dfn1.out dfn2.out dfn3.out + $(ECHO) '#include "pnglibconf.dfn"' >dfn.c + $(CPP) $(DFNFLAGS) dfn.c >dfn1.out + $(SED) -n -e 's|^.*PNG_DEFN_MAGIC-\(.*\)-PNG_DEFN_END.*$$|\1|p'\ + dfn1.out >dfn2.out + $(SED) -e 's| *@@@ *||g' -e 's| *$$||' dfn2.out >dfn3.out + $(COPY) dfn3.out $@ + $(DELETE) dfn.c dfn1.out dfn2.out dfn3.out + +pnglibconf.dfn: $(srcdir)/scripts/pnglibconf.dfa $(srcdir)/scripts/options.awk + $(DELETE) $@ dfn1.out dfn2.out + $(ECHO) "Calling $(AWK) from scripts/pnglibconf.mak" >&2 + $(ECHO) "If 'awk' crashes try a better awk (e.g. AWK='nawk')" >&2 + $(AWK) -f $(srcdir)/scripts/options.awk out=dfn1.out\ + $(srcdir)/scripts/pnglibconf.dfa $(DFA_XTRA) 1>&2 + $(AWK) -f $(srcdir)/scripts/options.awk out=dfn2.out dfn1.out 1>&2 + $(COPY) dfn2.out $@ + $(DELETE) dfn1.out dfn2.out + +clean-pnglibconf: + $(DELETE) pnglibconf.h pnglibconf.dfn dfn.c dfn1.out dfn2.out dfn3.out + +clean: clean-pnglibconf |