1 # -*- Makefile -*- for gettext-tools/lib
3 #### Start of system configuration section. ####
5 # Flags that can be set on the nmake command line:
6 # DLL=1 for compiling a .dll with a stub .lib (default is a static .lib)
7 # Note that this works only with MFLAGS=-MD.
8 # MFLAGS={-ML|-MT|-MD} for defining the compilation model
9 # MFLAGS=-ML (the default) Single-threaded, statically linked - libc.lib
10 # MFLAGS=-MT Multi-threaded, statically linked - libcmt.lib
11 # MFLAGS=-MD Multi-threaded, dynamically linked - msvcrt.lib
12 # DEBUG=1 for compiling with debugging information
13 # PREFIX=Some\Directory Base directory for installation
31 # Directories used by "make install":
33 exec_prefix = $(prefix)
34 bindir = $(exec_prefix)\bin
35 libdir = $(exec_prefix)\lib
36 includedir = $(prefix)\include
38 # Programs used by "make":
42 # Set to -W3 if you want to see maximum amount of warnings, including stupid
43 # ones. Set to -W1 to avoid warnings about signed/unsigned combinations.
49 # "-GD" (msvc5) optimizes for DLL.
50 # mscv4 doesn't know about this flag and ignores it.
58 # Some people prefer -O2 -G6 instead of -O1, but -O2 is not reliable in MSVC5.
59 OPTIMFLAGS = -D_NDEBUG -O1
63 CFLAGS = $(MFLAGS) $(WARN_CFLAGS) $(OPTIMFLAGS) -DHAVE_CONFIG_H -DEXEEXT=\".exe\" -DDEPENDS_ON_LIBINTL=1 -DDEPENDS_ON_LIBICONV=1
65 INCLUDES = -I. -I.. -I..\intl -I..\windows -I$(includedir)
73 # Programs used by "make install":
75 INSTALL_PROGRAM = copy
78 #### End of system configuration section. ####
85 backupfile.obj addext.obj \
112 progname.obj progreloc.obj \
120 xmalloc.obj xstrdup.obj \
129 getopt.obj getopt1.obj \
132 setenv.obj unsetenv.obj \
135 strcasecmp.obj strncasecmp.obj \
138 RESOURCES = gettextlib.res
142 allocsa.obj : allocsa.c
143 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c allocsa.c
145 argmatch.obj : argmatch.c
146 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c argmatch.c
148 backupfile.obj : backupfile.c
149 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c backupfile.c
151 addext.obj : addext.c
152 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c addext.c
154 basename.obj : basename.c
155 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c basename.c
157 c-ctype.obj : c-ctype.c
158 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c c-ctype.c
160 c-strcasecmp.obj : c-strcasecmp.c
161 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c c-strcasecmp.c
163 c-strncasecmp.obj : c-strncasecmp.c
164 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c c-strncasecmp.c
166 classpath.obj : classpath.c
167 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c classpath.c
169 closeout.obj : closeout.c
170 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c closeout.c
172 copy-file.obj : copy-file.c
173 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c copy-file.c
175 csharpcomp.obj : csharpcomp.c
176 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c csharpcomp.c
178 csharpexec.obj : csharpexec.c
179 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c csharpexec.c
181 error-progname.obj : error-progname.c
182 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c error-progname.c
184 execute.obj : execute.c
185 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c execute.c
187 exitfail.obj : exitfail.c
188 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c exitfail.c
190 fatal-signal.obj : fatal-signal.c
191 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c fatal-signal.c
193 findprog.obj : findprog.c
194 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c findprog.c
196 fstrcmp.obj : fstrcmp.c
197 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c fstrcmp.c
199 full-write.obj : full-write.c
200 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c full-write.c
202 fwriteerror.obj : fwriteerror.c
203 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c fwriteerror.c
206 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c gcd.c
209 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c hash.c
211 javacomp.obj : javacomp.c
212 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c javacomp.c
214 javaexec.obj : javaexec.c
215 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c javaexec.c
217 linebreak.obj : linebreak.c
218 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c linebreak.c
220 mbswidth.obj : mbswidth.c
221 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c mbswidth.c
223 obstack.obj : obstack.c
224 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c obstack.c
226 concatpath.obj : concatpath.c
227 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c concatpath.c
230 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c pipe.c
232 progname.obj : progname.c
233 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c progname.c
235 progreloc.obj : progreloc.c
236 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c progreloc.c
239 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c quote.c
241 quotearg.obj : quotearg.c
242 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c quotearg.c
244 safe-read.obj : safe-read.c
245 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c safe-read.c
247 safe-write.obj : safe-write.c
248 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c safe-write.c
250 sh-quote.obj : sh-quote.c
251 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c sh-quote.c
253 tmpdir.obj : tmpdir.c
254 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c tmpdir.c
256 wait-process.obj : wait-process.c
257 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c wait-process.c
259 xmalloc.obj : xmalloc.c
260 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c xmalloc.c
262 xstrdup.obj : xstrdup.c
263 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c xstrdup.c
265 xallocsa.obj : xallocsa.c
266 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c xallocsa.c
268 xerror.obj : xerror.c
269 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c xerror.c
271 xsetenv.obj : xsetenv.c
272 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c xsetenv.c
275 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c error.c
277 fnmatch.obj : fnmatch.c
278 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c fnmatch.c
280 getline.obj : getline.c
281 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c getline.c
283 getndelim2.obj : getndelim2.c
284 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c getndelim2.c
286 getopt.obj : getopt.c
287 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c getopt.c
289 getopt1.obj : getopt1.c
290 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c getopt1.c
292 mkdtemp.obj : mkdtemp.c
293 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c mkdtemp.c
295 relocatable.obj : relocatable.c
296 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c relocatable.c
298 setenv.obj : setenv.c
299 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c setenv.c
301 unsetenv.obj : unsetenv.c
302 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c unsetenv.c
304 stpcpy.obj : stpcpy.c
305 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c stpcpy.c
307 stpncpy.obj : stpncpy.c
308 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c stpncpy.c
310 strcasecmp.obj : strcasecmp.c
311 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c strcasecmp.c
313 strncasecmp.obj : strncasecmp.c
314 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c strncasecmp.c
316 vasprintf.obj : vasprintf.c
317 $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c vasprintf.c
321 gettextlib.lib : $(OBJECTS)
322 -$(RM) gettextlib.lib
323 $(AR) $(AR_FLAGS)gettextlib.lib $(OBJECTS)
327 # gettextlib.dll and gettextlib.lib are created together.
328 gettextlib.lib : ..\windows\gettextlib.def $(OBJECTS) $(RESOURCES)
329 $(CC) $(MFLAGS) $(DEBUGFLAGS) -LD ..\windows\gettextlib.def $(OBJECTS) ..\intl\intl.lib $(libdir)\iconv.lib $(RESOURCES) -Fegettextlib.dll
331 gettextlib.res : ../windows/gettextlib.rc
332 rc -Fo gettextlib.res ../windows/gettextlib.rc
338 -mkdir $(exec_prefix)
341 $(INSTALL_DATA) gettextlib.dll $(bindir)\gettextlib.dll
346 -mkdir $(exec_prefix)
353 $(RM) $(bindir)\gettextlib.dll
370 maintainer-clean : distclean