1 # This is the developer's makefile, not the user's makefile.
2 # Don't use it unless you know exactly what you do!
9 MAN2HTML = groff -mandoc -Thtml
14 all : configures lib/config.h.msvc include/iconv.h.msvc-static include/iconv.h.msvc-shared lib/aliases.h lib/aliases_aix.h lib/aliases_osf1.h lib/aliases_dos.h lib/flags.h lib/translit.h man/iconv.1.html man/iconv.3.html man/iconv_close.3.html man/iconv_open.3.html force
15 cd libcharset && $(MAKE) -f Makefile.devel all
18 # Before making a new release:
19 # - check that the encoding lists in README and man/iconv_open.3 are up to date,
20 # - increment the version number in
26 # libcharset/djgpp/README
27 # libcharset/djgpp/fnchange.lst
28 # - update the version info in lib/Makefile.in,
29 # - do "make -f Makefile.devel".
32 CONFIGURES = configure
33 CONFIGURES_IN = configure.in
36 ACLOCAL = $(CLISP_DIR)/src/autoconf/aclocal.m4
37 ACSELECT = $(CLISP_DIR)/src/autoconf/acselect
38 OTHERMACROS = $(CLISP_DIR)/src/autoconf/libtool.m4 autoconf/mbstate_t.m4
40 autoconf/aclocal.m4 : $(ACLOCAL)
41 ($(ACSELECT) `cat $(CONFIGURES_IN) | grep '^[A-Z][A-Z]_' | sed 's,[^A-Z_].*$$,,g' | sort | uniq` < $(ACLOCAL) ; cat $(OTHERMACROS) | sed -e 's,AC_CANONICAL_HOST,CL_CANONICAL_HOST,g' -e 's,AC_PROG_RANLIB,CL_PROG_RANLIB,g' -e 's,AC_PROG_LN_S,CL_PROG_LN_S,g') > autoconf/aclocal.m4
43 configures : $(CONFIGURES)
45 AUTOCONF_FILES = autoconf/aclocal.m4 autoconf/acgeneral.m4 autoconf/acspecific.m4
47 configure : configure.in $(AUTOCONF_FILES)
48 autoconf/autoconf -m autoconf
50 check-configures : $(CONFIGURES)
51 set -e; for f in $(CONFIGURES); do bash -x -n $$f; done
54 lib/config.h.msvc : lib/config.h.in
55 sed -e 's/#undef WORDS_LITTLEENDIAN$$/#define WORDS_LITTLEENDIAN 1/' < $< > $@
57 include/iconv.h.msvc-static : include/iconv.h.in
58 sed -e 's/@ICONV_CONST@/const/g' < $< > $@
60 include/iconv.h.msvc-shared : include/iconv.h.in windows/dllexport.h
61 sed -e 's/@ICONV_CONST@/const/g' -e 's/extern \([^"]\)/extern LIBICONV_DLL_EXPORTED \1/' -e '/_LIBICONV_VERSION/r windows/dllexport.h' < $< > $@
64 # We use "-7" to make a smaller table, but use "unsigned char" array indices
65 # to avoid gcc warning.
66 lib/aliases.h : lib/aliases.gperf
67 $(GPERF) -t -L ANSI-C -H aliases_hash -N aliases_lookup -7 -C -k '1,3-11,$$' -i 1 lib/aliases.gperf | sed -e 's/\[str/\[(unsigned char) str/' > tmp.h
68 $(CP) tmp.h lib/aliases.h
71 lib/aliases.gperf : lib/encodings.def lib/encodings_local.def lib/genaliases.c
72 $(CC) $(CFLAGS) lib/genaliases.c -o genaliases
73 ./genaliases > lib/aliases.gperf
76 lib/aliases_aix.h : lib/encodings_aix.def lib/genaliases2.c
77 $(CC) $(CFLAGS) -DUSE_AIX lib/genaliases2.c -o genaliases
78 ./genaliases > lib/aliases_aix.h
81 lib/aliases_osf1.h : lib/encodings_osf1.def lib/genaliases2.c
82 $(CC) $(CFLAGS) -DUSE_OSF1 lib/genaliases2.c -o genaliases
83 ./genaliases > lib/aliases_osf1.h
86 lib/aliases_dos.h : lib/encodings_dos.def lib/genaliases2.c
87 $(CC) $(CFLAGS) -DUSE_DOS lib/genaliases2.c -o genaliases
88 ./genaliases > lib/aliases_dos.h
92 lib/flags.h : lib/encodings.def lib/encodings_aix.def lib/encodings_osf1.def lib/encodings_dos.def lib/converters.h lib/genflags.c
93 $(CC) $(CFLAGS) lib/genflags.c -o genflags
94 ./genflags > lib/flags.h
98 lib/translit.h : lib/translit.def lib/gentranslit.c
99 $(CC) $(CFLAGS) lib/gentranslit.c -o gentranslit
100 ./gentranslit < lib/translit.def > lib/translit.h