comparison Make.msvc @ 0:d39e1d0d75b6

initial add
author paulo@hit-nxdomain.opendns.com
date Sat, 20 Feb 2010 21:18:28 -0800
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:e98fe16e33f3
1 # $Id: Make.msvc,v 1.11 2006/08/06 17:31:22 mkern Exp $
2
3 GT_MAJOR_VERSION = 0
4 GT_MINOR_VERSION = 0
5 GT_MICRO_VERSION = 11
6 GT_EXTRA_VERSION =
7 VERSION = $(GT_MAJOR_VERSION).$(GT_MINOR_VERSION).$(GT_MICRO_VERSION)
8
9
10 O = .obj
11
12
13 # dynamic by default
14 !if !defined(static) && !defined(STATIC)
15 DYNAMIC=1
16 !endif
17
18
19 ##########################
20 # release / debug
21 ##########################
22
23
24 !if defined(release) || defined(RELEASE)
25
26
27 D=
28 DEXT=
29
30
31 CFLAGS = $(CFLAGS) -Ox -G6
32 LDFLAGS = $(LDFLAGS) -release -FORCE:UNRESOLVED
33
34 #DEFS = $(DEFS) -DNDEBUG -UDEBUG -U_DEBUG
35 DEFS = $(DEFS) -D_DEBUG -DDEBUG -UNDEBUG -D_WALL
36
37
38 !else # !defined(release) && !defined(RELEASE)
39
40
41 D=d
42 DEXT=d
43
44
45 CFLAGS = $(CFLAGS) -Od -Gm -GZ -W3 -Zi
46 DEFS = $(DEFS) -D_DEBUG -DDEBUG -UNDEBUG -D_WALL
47 LDFLAGS = $(LDFLAGS) -debug
48
49
50 !endif # defined(release) || defined(RELEASE)
51
52
53 ##########################
54 # static / dynamic linking
55 ##########################
56
57
58 !if defined(dynamic) || defined(DYNAMIC)
59
60 CFLAGS = $(CFLAGS) -MD$(D) -DUSE_LTDL
61
62 !else # !(defined(dynamic) || defined(DYNAMIC))
63
64 CFLAGS = $(CFLAGS) -MT$(D) -UUSE_LTDL
65
66 !endif # defined(dynamic) || defined(DYNAMIC)
67
68
69 ##########################
70 # libxml2 support
71 ##########################
72
73 !if defined(libxml2) || defined(LIBXML2) || defined(xml) || defined(XML)
74
75
76 !if "$(LIBXML2_ROOT)" == ""
77
78 LIBXML2_ROOT=$(BUILD_ROOT)\libxml2
79
80 !endif # "$(LIBXML2_ROOT)" == ""
81
82 !if !exists($(LIBXML2_ROOT))
83
84 !error Directory $(LIBXML2_ROOT) not found!
85
86 !endif # !exists($(LIBXML2_ROOT))
87
88
89 INCLUDES = $(INCLUDES) -I$(LIBXML2_ROOT)\include
90 DEFS = $(DEFS) -DUSE_LIBXML2
91 LDFLAGS = $(LDFLAGS) -libpath:"$(LIBXML2_ROOT)\win32\bin.msvc"
92 LIBS = $(LIBS) libxml2.lib
93
94
95 !if defined(dynamic) || defined(DYNAMIC)
96
97 DIST_DLLS = $(DIST_DLLS) $(LIBXML2_ROOT)\win32\bin.msvc\libxml2.dll
98
99 !endif # defined(dynamic) || defined(DYNAMIC)
100
101
102 !endif # defined(libxml2) || defined(LIBXML2) || defined(xml) || defined(XML)
103
104
105 ##########################
106 # zlib support
107 ##########################
108
109
110 !if defined(zlib) || defined(ZLIB)
111
112
113 !if "$(ZLIB_ROOT)" == ""
114
115
116 ZLIB_ROOT=$(BUILD_ROOT)\zlib
117
118
119 !endif # "$(ZLIB_ROOT)" == ""
120
121
122 !if !exists($(ZLIB_ROOT))
123
124
125 !error Directory $(ZLIB_ROOT) not found!
126
127
128 !endif # !exists($(ZLIB_ROOT))
129
130
131 INCLUDES = $(INCLUDES) -I$(ZLIB_ROOT)
132 DEFS = $(DEFS) -DUSE_ZLIB
133 LDFLAGS = $(LDFLAGS) -libpath:"$(ZLIB_ROOT)"
134 LIBS = $(LIBS) zlib.lib
135
136
137 !endif # defined(zlib) || defined(ZLIB)
138
139
140 ##########################
141 # general
142 ##########################
143
144
145 # temporary till Gnutella doesn't require giFT symbols anymore
146 GIFT_LIB = giFT$(DEXT).lib
147 GIFT_DLL = giFT$(DEXT).dll
148 GIFT_EXE = giFT$(DEXT).exe
149
150
151 LIBGIFT_LIB = libgiFT$(DEXT).lib
152 LIBGIFT_DLL = libgiFT$(DEXT).dll
153 LIBGIFT_STATIC = libgiFTstatic$(DEXT).lib
154 LIBGIFTPROTO_LIB = libgiFTproto$(DEXT).lib
155 LIBGIFTPROTO_DLL = libgiFTproto$(DEXT).dll
156 LIBGIFTPROTO_STATIC = libgiFTprotostatic$(DEXT).lib
157 GNUTELLA_LIB = Gnutella$(DEXT).lib
158 GNUTELLA_DLL = Gnutella.dll
159 GNUTELLA_STATIC = Gnutellastatic$(DEXT).lib
160
161
162 CFLAGS = $(CFLAGS) -nologo
163 DEFS = $(DEFS) -DHAVE_CONFIG_H -DWIN32 -DNO_STRICT
164 DEFS = $(DEFS) -DGT_MAJOR_VERSION=\"$(GT_MAJOR_VERSION)\" \
165 -DGT_MINOR_VERSION=\"$(GT_MINOR_VERSION)\" \
166 -DGT_MICRO_VERSION=\"$(GT_MICRO_VERSION)\" \
167 -DGT_EXTRA_VERSION=\"$(GT_EXTRA_VERSION)\"
168
169
170 INCLUDES = -I$(BUILD_ROOT) -I$(BUILD_ROOT)\libgift\win32 $(INCLUDES)
171
172
173 LDFLAGS = $(LDFLAGS) -nologo -version:$(VERSION)
174 LDFLAGS = $(LDFLAGS) -libpath:"$(BUILD_ROOT)\libgift" -libpath:"$(BUILD_ROOT)\libgift\proto"
175
176
177 LIBS = $(LIBS) wsock32.lib
178
179
180 DEFS = $(DEFS) -D_WINDOWS -U_CONSOLE
181 LDFLAGS = $(LDFLAGS) /subsystem:windows
182
183
184 ##########################
185 # tools
186 ##########################
187
188
189 CC = cl
190 LD = link
191 LT = lib