1## Makefile for the srclib subdirectory of GNU libiconv 2## Copyright (C) 2003-2006 Free Software Foundation, Inc. 3## 4## This program is free software; you can redistribute it and/or modify 5## it under the terms of the GNU General Public License as published by 6## the Free Software Foundation; either version 2, or (at your option) 7## any later version. 8## 9## This program is distributed in the hope that it will be useful, 10## but WITHOUT ANY WARRANTY; without even the implied warranty of 11## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12## GNU General Public License for more details. 13## 14## You should have received a copy of the GNU General Public License 15## along with this program; if not, write to the Free Software 16## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 17## USA. 18 19## Process this file with automake to produce Makefile.in. 20 21AUTOMAKE_OPTIONS = 1.5 gnits no-dependencies 22BUILT_SOURCES = 23EXTRA_DIST = 24MOSTLYCLEANFILES = 25 26RM = rm -f 27 28noinst_LIBRARIES = libicrt.a 29 30# Sources that are compiled on all platforms. 31 32libicrt_a_SOURCES = \ 33 allocsa.h allocsa.c \ 34 exit.h \ 35 pathmax.h \ 36 progname.h progname.c progreloc.c \ 37 unlocked-io.h \ 38 width.c uniwidth.h unitypes.h cjk.h streq.h \ 39 xalloc.h xmalloc.c xstrdup.c \ 40 xreadlink.h xreadlink.c 41 42# Sources that are compiled only on platforms that lack the functions. 43 44LIBADD_SOURCE = \ 45 canonicalize.h canonicalize.c \ 46 error.h error.c \ 47 memmove.c \ 48 readlink.c \ 49 relocatable.h relocatable.c \ 50 setenv.h setenv.c unsetenv.c \ 51 strerror.c 52 53# How to build libicrt.a. 54 55libicrt_a_LIBADD = @SRCLIBOBJS@ 56libicrt_a_DEPENDENCIES = @SRCLIBOBJS@ 57 58# List of files to be distributed. 59 60EXTRA_DIST += \ 61 $(LIBADD_SOURCE) relocwrapper.c 62 63INCLUDES = -I. -I$(srcdir) 64 65DEFS = -DEXEEXT=\"$(EXEEXT)\" -DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1 @DEFS@ 66 67 68# >>> gnulib module stdbool. 69EXTRA_DIST += stdbool_.h 70 71# The following is needed in order to create an <stdbool.h> when the system 72# doesn't have one that works. 73all-local $(libicrt_a_OBJECTS): @STDBOOL_H@ 74stdbool.h: stdbool_.h 75 sed -e 's/@''HAVE__BOOL''@/@HAVE__BOOL@/g' < $(srcdir)/stdbool_.h > stdbool.h 76MOSTLYCLEANFILES += stdbool.h 77# <<< gnulib module stdbool. 78 79 80# >>> gnulib module stdint. 81BUILT_SOURCES += $(STDINT_H) 82EXTRA_DIST += stdint_.h 83 84# We need the following in order to create an <stdint.h> when the system 85# doesn't have one that works with the given compiler. 86all-local $(libicrt_a_OBJECTS): $(STDINT_H) 87stdint.h: stdint_.h 88 sed -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \ 89 -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \ 90 -e 's|@''FULL_PATH_STDINT_H''@|$(FULL_PATH_STDINT_H)|g' \ 91 -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ 92 -e 's|@''FULL_PATH_INTTYPES_H''@|$(FULL_PATH_INTTYPES_H)|g' \ 93 -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \ 94 -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \ 95 -e 's/@''HAVE_LONG_64BIT''@/$(HAVE_LONG_64BIT)/g' \ 96 -e 's/@''HAVE_LONG_LONG_64BIT''@/$(HAVE_LONG_LONG_64BIT)/g' \ 97 -e 's/@''HAVE_INT8_T''@/$(HAVE_INT8_T)/g' \ 98 -e 's/@''HAVE_INT16_T''@/$(HAVE_INT16_T)/g' \ 99 -e 's/@''HAVE_INT32_T''@/$(HAVE_INT32_T)/g' \ 100 -e 's/@''HAVE_INT64_T''@/$(HAVE_INT64_T)/g' \ 101 -e 's/@''HAVE_UINT8_T''@/$(HAVE_UINT8_T)/g' \ 102 -e 's/@''HAVE_UINT16_T''@/$(HAVE_UINT16_T)/g' \ 103 -e 's/@''HAVE_UINT32_T''@/$(HAVE_UINT32_T)/g' \ 104 -e 's/@''HAVE_UINT64_T''@/$(HAVE_UINT64_T)/g' \ 105 -e 's/@''HAVE_INT_LEAST8_T''@/$(HAVE_INT_LEAST8_T)/g' \ 106 -e 's/@''HAVE_INT_LEAST16_T''@/$(HAVE_INT_LEAST16_T)/g' \ 107 -e 's/@''HAVE_INT_LEAST32_T''@/$(HAVE_INT_LEAST32_T)/g' \ 108 -e 's/@''HAVE_INT_LEAST64_T''@/$(HAVE_INT_LEAST64_T)/g' \ 109 -e 's/@''HAVE_UINT_LEAST8_T''@/$(HAVE_UINT_LEAST8_T)/g' \ 110 -e 's/@''HAVE_UINT_LEAST16_T''@/$(HAVE_UINT_LEAST16_T)/g' \ 111 -e 's/@''HAVE_UINT_LEAST32_T''@/$(HAVE_UINT_LEAST32_T)/g' \ 112 -e 's/@''HAVE_UINT_LEAST64_T''@/$(HAVE_UINT_LEAST64_T)/g' \ 113 -e 's/@''HAVE_INT_FAST8_T''@/$(HAVE_INT_FAST8_T)/g' \ 114 -e 's/@''HAVE_INT_FAST16_T''@/$(HAVE_INT_FAST16_T)/g' \ 115 -e 's/@''HAVE_INT_FAST32_T''@/$(HAVE_INT_FAST32_T)/g' \ 116 -e 's/@''HAVE_INT_FAST64_T''@/$(HAVE_INT_FAST64_T)/g' \ 117 -e 's/@''HAVE_UINT_FAST8_T''@/$(HAVE_UINT_FAST8_T)/g' \ 118 -e 's/@''HAVE_UINT_FAST16_T''@/$(HAVE_UINT_FAST16_T)/g' \ 119 -e 's/@''HAVE_UINT_FAST32_T''@/$(HAVE_UINT_FAST32_T)/g' \ 120 -e 's/@''HAVE_UINT_FAST64_T''@/$(HAVE_UINT_FAST64_T)/g' \ 121 -e 's/@''HAVE_INTPTR_T''@/$(HAVE_INTPTR_T)/g' \ 122 -e 's/@''HAVE_UINTPTR_T''@/$(HAVE_UINTPTR_T)/g' \ 123 -e 's/@''HAVE_INTMAX_T''@/$(HAVE_INTMAX_T)/g' \ 124 -e 's/@''HAVE_UINTMAX_T''@/$(HAVE_UINTMAX_T)/g' \ 125 -e 's/@''BITSIZEOF_UNSIGNED_INT''@/$(BITSIZEOF_UNSIGNED_INT)/g' \ 126 -e 's/@''BITSIZEOF_LONG''@/$(BITSIZEOF_LONG)/g' \ 127 -e 's/@''BITSIZEOF_UNSIGNED_LONG''@/$(BITSIZEOF_UNSIGNED_LONG)/g' \ 128 -e 's/@''BITSIZEOF_INT8_T''@/$(BITSIZEOF_INT8_T)/g' \ 129 -e 's/@''BITSIZEOF_INT16_T''@/$(BITSIZEOF_INT16_T)/g' \ 130 -e 's/@''BITSIZEOF_INT32_T''@/$(BITSIZEOF_INT32_T)/g' \ 131 -e 's/@''BITSIZEOF_INT64_T''@/$(BITSIZEOF_INT64_T)/g' \ 132 -e 's/@''BITSIZEOF_UINT8_T''@/$(BITSIZEOF_UINT8_T)/g' \ 133 -e 's/@''BITSIZEOF_UINT16_T''@/$(BITSIZEOF_UINT16_T)/g' \ 134 -e 's/@''BITSIZEOF_UINT32_T''@/$(BITSIZEOF_UINT32_T)/g' \ 135 -e 's/@''BITSIZEOF_UINT64_T''@/$(BITSIZEOF_UINT64_T)/g' \ 136 -e 's/@''BITSIZEOF_INT_LEAST8_T''@/$(BITSIZEOF_INT_LEAST8_T)/g' \ 137 -e 's/@''BITSIZEOF_INT_LEAST16_T''@/$(BITSIZEOF_INT_LEAST16_T)/g' \ 138 -e 's/@''BITSIZEOF_INT_LEAST32_T''@/$(BITSIZEOF_INT_LEAST32_T)/g' \ 139 -e 's/@''BITSIZEOF_INT_LEAST64_T''@/$(BITSIZEOF_INT_LEAST64_T)/g' \ 140 -e 's/@''BITSIZEOF_UINT_LEAST8_T''@/$(BITSIZEOF_UINT_LEAST8_T)/g' \ 141 -e 's/@''BITSIZEOF_UINT_LEAST16_T''@/$(BITSIZEOF_UINT_LEAST16_T)/g' \ 142 -e 's/@''BITSIZEOF_UINT_LEAST32_T''@/$(BITSIZEOF_UINT_LEAST32_T)/g' \ 143 -e 's/@''BITSIZEOF_UINT_LEAST64_T''@/$(BITSIZEOF_UINT_LEAST64_T)/g' \ 144 -e 's/@''BITSIZEOF_INT_FAST8_T''@/$(BITSIZEOF_INT_FAST8_T)/g' \ 145 -e 's/@''BITSIZEOF_INT_FAST16_T''@/$(BITSIZEOF_INT_FAST16_T)/g' \ 146 -e 's/@''BITSIZEOF_INT_FAST32_T''@/$(BITSIZEOF_INT_FAST32_T)/g' \ 147 -e 's/@''BITSIZEOF_INT_FAST64_T''@/$(BITSIZEOF_INT_FAST64_T)/g' \ 148 -e 's/@''BITSIZEOF_UINT_FAST8_T''@/$(BITSIZEOF_UINT_FAST8_T)/g' \ 149 -e 's/@''BITSIZEOF_UINT_FAST16_T''@/$(BITSIZEOF_UINT_FAST16_T)/g' \ 150 -e 's/@''BITSIZEOF_UINT_FAST32_T''@/$(BITSIZEOF_UINT_FAST32_T)/g' \ 151 -e 's/@''BITSIZEOF_UINT_FAST64_T''@/$(BITSIZEOF_UINT_FAST64_T)/g' \ 152 -e 's/@''BITSIZEOF_INTPTR_T''@/$(BITSIZEOF_INTPTR_T)/g' \ 153 -e 's/@''BITSIZEOF_UINTPTR_T''@/$(BITSIZEOF_UINTPTR_T)/g' \ 154 -e 's/@''BITSIZEOF_INTMAX_T''@/$(BITSIZEOF_INTMAX_T)/g' \ 155 -e 's/@''BITSIZEOF_UINTMAX_T''@/$(BITSIZEOF_UINTMAX_T)/g' \ 156 -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \ 157 -e 's/@''SAME_TYPE_PTRDIFF_T_LONG''@/$(SAME_TYPE_PTRDIFF_T_LONG)/g' \ 158 -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \ 159 -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \ 160 -e 's/@''SAME_TYPE_SIG_ATOMIC_T_LONG''@/$(SAME_TYPE_SIG_ATOMIC_T_LONG)/g' \ 161 -e 's/@''SAME_TYPE_SIG_ATOMIC_T_UNSIGNED_LONG''@/$(SAME_TYPE_SIG_ATOMIC_T_UNSIGNED_LONG)/g' \ 162 -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \ 163 -e 's/@''SAME_TYPE_SIZE_T_UNSIGNED_LONG''@/$(SAME_TYPE_SIZE_T_UNSIGNED_LONG)/g' \ 164 -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \ 165 -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \ 166 -e 's/@''SAME_TYPE_WCHAR_T_LONG''@/$(SAME_TYPE_WCHAR_T_LONG)/g' \ 167 -e 's/@''SAME_TYPE_WCHAR_T_UNSIGNED_LONG''@/$(SAME_TYPE_WCHAR_T_UNSIGNED_LONG)/g' \ 168 -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \ 169 -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \ 170 -e 's/@''SAME_TYPE_WINT_T_LONG''@/$(SAME_TYPE_WINT_T_LONG)/g' \ 171 -e 's/@''SAME_TYPE_WINT_T_UNSIGNED_LONG''@/$(SAME_TYPE_WINT_T_UNSIGNED_LONG)/g' \ 172 < $(srcdir)/stdint_.h > $@-t 173 mv $@-t $@ 174MOSTLYCLEANFILES += stdint.h stdint.h-t 175# <<< gnulib module stdint. 176 177 178# >>> gnulib module alloca. 179EXTRA_DIST += alloca_.h 180 181# The following is needed in order to create an <alloca.h> when the system 182# doesn't have one that works with the given compiler. 183all-local $(libicrt_a_OBJECTS): @ALLOCA_H@ 184alloca.h: alloca_.h 185 cp $(srcdir)/alloca_.h alloca.h 186MOSTLYCLEANFILES += alloca.h 187# <<< gnulib module alloca. 188 189 190# >>> gnulib module unistd. 191BUILT_SOURCES += $(UNISTD_H) 192 193# We need the following in order to create an empty placeholder for 194# <unistd.h> when the system doesn't have one. 195unistd.h: 196 echo '/* Empty placeholder for $@. */' >$@ 197MOSTLYCLEANFILES += unistd.h 198# <<< gnulib module unistd. 199 200 201# Woe32 support. 202 203EXTRA_DIST += Makefile.msvc 204