2 # This is the developer's makefile, not the user's makefile.
3 # Don't use it unless you know exactly what you do!
7 AUTOCONF = autoconf-2.52
11 MAN2HTML = groff -mandoc -Thtml
16 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/aliases_extra.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
17 cd libcharset && $(MAKE) -f Makefile.devel all
20 # Before making a new release:
21 # - check that the encoding lists in README and man/iconv_open.3 are up to date,
22 # - increment the version number in
28 # libcharset/djgpp/README
29 # libcharset/djgpp/fnchange.lst
30 # - update the version info in lib/Makefile.in,
31 # - do "make -f Makefile.devel".
34 CONFIGURES = configure
35 CONFIGURES_IN = configure.in
39 #m4/general.m4 : $(CLISP_DIR)/src/m4/general.m4 ; cp -p $< $@-t && mv $@-t $@
40 #m4/proto.m4 : $(CLISP_DIR)/src/m4/proto.m4 ; cp -p $< $@-t && mv $@-t $@
41 #m4/ranlib.m4 : $(CLISP_DIR)/src/m4/ranlib.m4 ; cp -p $< $@-t && mv $@-t $@
42 #m4/cp.m4 : $(CLISP_DIR)/src/m4/cp.m4 ; cp -p $< $@-t && mv $@-t $@
43 #m4/ln.m4 : $(CLISP_DIR)/src/m4/ln.m4 ; cp -p $< $@-t && mv $@-t $@
44 #m4/endian.m4 : $(CLISP_DIR)/src/m4/endian.m4 ; cp -p $< $@-t && mv $@-t $@
45 #m4/libtool.m4 : $(CLISP_DIR)/src/m4/libtool.m4
46 # 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' < $< > $@-t && mv $@-t $@
48 autoconf/aclocal.m4 : m4/general.m4 m4/proto.m4 m4/ranlib.m4 m4/cp.m4 m4/ln.m4 m4/endian.m4 m4/libtool.m4
49 aclocal --acdir=m4 --output=$@
51 configures : $(CONFIGURES)
53 AUTOCONF_FILES = autoconf/aclocal.m4
55 configure : configure.in $(AUTOCONF_FILES)
56 $(AUTOCONF) -l autoconf
58 check-configures : $(CONFIGURES)
59 set -e; for f in $(CONFIGURES); do bash -x -n $$f; done
62 lib/config.h.msvc : lib/config.h.in
63 sed -e 's/#undef WORDS_LITTLEENDIAN$$/#define WORDS_LITTLEENDIAN 1/' < $< > $@
65 include/iconv.h.msvc-static : include/iconv.h.in
66 sed -e 's/@ICONV_CONST@/const/g' < $< > $@
68 include/iconv.h.msvc-shared : include/iconv.h.in windows/dllexport.h
69 sed -e 's/@ICONV_CONST@/const/g' -e 's/extern \([^"]\)/extern LIBICONV_DLL_EXPORTED \1/' -e '/_LIBICONV_VERSION/r windows/dllexport.h' < $< > $@
72 # We use "-7" to make a smaller table, but use "unsigned char" array indices
73 # to avoid gcc warning.
74 lib/aliases.h : lib/aliases.gperf
75 $(GPERF) -t -L ANSI-C -H aliases_hash -N aliases_lookup -G -W aliases -7 -C -k '1,3-11,$$' -i 1 lib/aliases.gperf | sed -e 's/\[str/\[(unsigned char) str/' > tmp.h
76 $(CP) tmp.h lib/aliases.h
79 lib/aliases.gperf : lib/encodings.def lib/encodings_local.def lib/genaliases.c
80 $(CC) $(CFLAGS) lib/genaliases.c -o genaliases
81 ./genaliases > lib/aliases.gperf
84 lib/aliases_aix.h : lib/encodings_aix.def lib/genaliases2.c
85 $(CC) $(CFLAGS) -DUSE_AIX lib/genaliases2.c -o genaliases
86 ./genaliases > lib/aliases_aix.h
89 lib/aliases_osf1.h : lib/encodings_osf1.def lib/genaliases2.c
90 $(CC) $(CFLAGS) -DUSE_OSF1 lib/genaliases2.c -o genaliases
91 ./genaliases > lib/aliases_osf1.h
94 lib/aliases_dos.h : lib/encodings_dos.def lib/genaliases2.c
95 $(CC) $(CFLAGS) -DUSE_DOS lib/genaliases2.c -o genaliases
96 ./genaliases > lib/aliases_dos.h
99 lib/aliases_extra.h : lib/encodings_extra.def lib/genaliases2.c
100 $(CC) $(CFLAGS) -DUSE_EXTRA lib/genaliases2.c -o genaliases
101 ./genaliases > lib/aliases_extra.h
105 lib/flags.h : lib/encodings.def lib/encodings_aix.def lib/encodings_osf1.def lib/encodings_dos.def lib/encodings_extra.def lib/converters.h lib/genflags.c
106 $(CC) $(CFLAGS) lib/genflags.c -o genflags
107 ./genflags > lib/flags.h
111 lib/translit.h : lib/translit.def lib/gentranslit.c
112 $(CC) $(CFLAGS) lib/gentranslit.c -o gentranslit
113 ./gentranslit < lib/translit.def > lib/translit.h