Initial revision
[TestXSLT.git] / libiconv / libcharset / lib / Makefile.msvc
1 # -*- Makefile -*- for libcharset/lib
2
3 #### Start of system configuration section. ####
4
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 # Note that nmake command line flags are automatically passed to subdirectory
14 # Makefiles. Therefore we don't need to pass them explicitly to subdirectory
15 # Makefiles, but the subdirectory Makefiles need to have the same defaults.
16 !if !defined(DLL)
17 DLL=0
18 !endif
19 !if !defined(DEBUG)
20 DEBUG=0
21 !endif
22 !if !defined(MFLAGS)
23 !if !$(DLL)
24 MFLAGS=
25 !else
26 MFLAGS=-MD
27 !endif
28 !endif
29
30 # Directories used by "make":
31 srcdir = .
32
33 # Directories used by "make install":
34 prefix = /usr/local
35 local_prefix = /usr/local
36 exec_prefix = $(prefix)
37 libdir = $(exec_prefix)/lib
38
39 # Programs used by "make":
40
41 CC = cl
42
43 # Set to -W3 if you want to see maximum amount of warnings, including stupid
44 # ones. Set to -W1 to avoid warnings about signed/unsigned combinations.
45 WARN_CFLAGS = -W1
46
47 !if !$(DLL)
48 PICFLAGS =
49 !else
50 # "-GD" (msvc5) optimizes for DLL.
51 # mscv4 doesn't know about this flag and ignores it.
52 PICFLAGS = -GD
53 !endif
54
55 !if $(DEBUG)
56 OPTIMFLAGS = -Od -Z7
57 !else
58 # Some people prefer -O2 -G6 instead of -O1, but -O2 is not reliable in MSVC5.
59 OPTIMFLAGS = -D_NDEBUG -O1
60 !endif
61
62 # -DBUILDING_LIBCHARSET: Change expansion of LIBCHARSET_DLL_EXPORTED macro.
63 CFLAGS = $(MFLAGS) $(WARN_CFLAGS) $(PICFLAGS) $(OPTIMFLAGS) -DHAVE_CONFIG_H -DBUILDING_LIBCHARSET
64
65 INCLUDES = -I. -I$(srcdir) -I.. -I$(srcdir)/..
66
67 AR = lib
68 AR_FLAGS = /out:
69
70 LN = copy
71 RM = -del
72
73 # Programs used by "make install":
74 INSTALL = @INSTALL@
75 INSTALL_PROGRAM = @INSTALL_PROGRAM@
76 INSTALL_DATA = @INSTALL_DATA@
77
78 #### End of system configuration section. ####
79
80 SHELL = /bin/sh
81
82 SOURCES = $(srcdir)/localcharset.c
83
84 OBJECTS = localcharset.obj
85
86 # Set to charset.res in order to include the resources information.
87 RESOURCES =
88 # RESOURCES = charset.res
89
90 all : charset.lib
91
92 localcharset.obj : $(srcdir)/localcharset.c
93         $(CC) $(INCLUDES) $(CFLAGS) -c $(srcdir)/localcharset.c
94
95 !if !$(DLL)
96
97 charset.lib : $(OBJECTS)
98         -$(RM) charset.lib
99         $(AR) $(AR_FLAGS)charset.lib $(OBJECTS)
100
101 !else
102
103 # charset.dll and iconv.lib are created together.
104 charset.lib : $(OBJECTS) $(RESOURCES)
105         $(CC) $(MFLAGS) -LD $(OBJECTS) $(RESOURCES)
106
107 #charset.res : $(srcdir)/../windows/charset.rc
108 #       rc -Fo charset.res $(srcdir)/../windows/charset.rc
109
110 !endif
111
112 check : all
113
114 mostlyclean : clean
115
116 clean : force
117         $(RM) *.obj
118         $(RM) *.lib
119         $(RM) *.exp
120         $(RM) *.dll
121         $(RM) charset.res
122         $(RM) charset.alias
123         $(RM) core
124
125 distclean : clean
126
127 maintainer-clean : distclean
128
129 force :
130