1 # Makefile for libiconv/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
27 # Directories used by "make":
30 # Directories used by "make install":
32 local_prefix = /usr/local
33 exec_prefix = $(prefix)
34 libdir = $(exec_prefix)/lib
36 # Programs used by "make":
40 # Set to -W3 if you want to see maximum amount of warnings, including stupid
41 # ones. Set to -W1 to avoid warnings about signed/unsigned combinations.
47 # "-GD" (msvc5) optimizes for DLL.
48 # mscv4 doesn't know about this flag and ignores it.
55 # Some people prefer -O2 -G6 instead of -O1, but -O2 is not reliable in MSVC5.
56 OPTIMFLAGS = -D_NDEBUG -O1
59 # -DBUILDING_LIBICONV: Change expansion of LIBICONV_DLL_EXPORTED macro.
60 CFLAGS = $(MFLAGS) $(WARN_CFLAGS) $(PICFLAGS) $(OPTIMFLAGS) -DBUILDING_LIBICONV
62 INCLUDES = -I. -I$(srcdir) -I../include -I$(srcdir)/../include
70 # Programs used by "make install":
72 INSTALL_PROGRAM = @INSTALL_PROGRAM@
73 INSTALL_DATA = @INSTALL_DATA@
75 #### End of system configuration section. ####
79 SOURCES = $(srcdir)/iconv.c
83 LIBCHARSET_OBJECTS = ..\libcharset\lib\localcharset.obj
85 # Set to iconv.res in order to include the resources information.
87 # RESOURCES = iconv.res
91 config.h : config.h.msvc
93 $(LN) config.h.msvc config.h
95 iconv.obj : $(srcdir)/iconv.c $(srcdir)/encodings.def $(srcdir)/encodings_local.def $(srcdir)/aliases.h config.h
96 $(CC) $(INCLUDES) $(CFLAGS) -c $(srcdir)/iconv.c
100 iconv.lib : $(OBJECTS)
102 $(AR) $(AR_FLAGS)iconv.lib $(OBJECTS) $(LIBCHARSET_OBJECTS)
106 # iconv.dll and iconv.lib are created together.
107 iconv.lib : $(OBJECTS) $(RESOURCES)
108 $(CC) $(MFLAGS) -LD $(OBJECTS) $(LIBCHARSET_OBJECTS) $(RESOURCES)
110 iconv.res : $(srcdir)/../windows/iconv.rc
111 rc -Fo iconv.res $(srcdir)/../windows/iconv.rc
130 maintainer-clean : distclean