-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathhuskymak.cfg.mvc
324 lines (253 loc) · 6.81 KB
/
huskymak.cfg.mvc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
# Config-Makefile for Husky-packages
# You must modify this file according to your needs.
## common options ##
# Build with debug info, link with debug version of CRT
DEBUG=0
DEBUG_TREE=0
# Enable optimization
OPTIMIZATION=0
# Build libraries as dlls. Buils static libs otherwise
!if "$(DYNLIBS)"=="1"
DYNLIBS=1
!else
DYNLIBS=0
!endif
# Link CRT statically
# It is useful for building binaries for distribution but it will generate big executables
# Don't use with DYNLIBS=1 without testing first
STATICCRT = 0
# Perl support
USE_PERL=0
# ZipInternal packer
USE_HPTZIP=1
# Uncomment one of these lines if you want to enable hardlinking
# on NTFS 4.0 or 5.0
#NTDEF = -D_WIN32_WINNT=0 -D_WIN32_WINDOWS=0x0400 -DWINVER=0x0400
#NTDEF = -D_WIN32_WINNT=0x0400
#NTDEF = -D_WIN32_WINNT=0x0500
!if $(USE_PERL)==1
PERL_DIR = C:\Perl
PERLV = 510
PERLL = delayimp.lib $(PERL_DIR)\lib\core\perl$(PERLV).lib
PERLI = -I$(PERL_DIR)\lib\core
PERLD = -DDO_PERL -DWIN32 -DNO_STRICT -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DPERL_MSVCRT_READFIX
PERLDLL = /delayload:perl$(PERLV).dll
PERLOBJ = $(O)perl$(_OBJ)
!else
PERLOBJ =
PERLI =
PERLD =
PERLDLL =
!endif
!if $(USE_HPTZIP) == 1
!if $(DYNLIBS)==1
HPTZIPL = $(LIBOUT)/$(IMPLIBPREFIX)hptzip$(DLLSUFFIX)$(_LIB)
!else
HPTZIPL = $(LIBOUT)/$(LIBPREFIX)hptzip$(LIBSUFFIX)$(_LIB)
!endif
# path to "hptzip/hptzip.h"
HPTZIPI = -I../../hptzip
HPTZIPD = -DUSE_HPTZIP
ZLIBH = ../../hptzip/zlib-win32
# or set it to directory with zlib sources
#ZLIBH =
!if $(DEBUG) == 1
# You can set both to the same value if no debug version exist or if
# no zlib debug is needed.
# ZLIBL can point to static library or import library for dll.
# This choice does not depend on DYNLIBS value. Do keep in mind though
# that official zlib1.dll is linked against msvcrt.dll and it is recommended
# to link any app using it against same dll, which is not possible
# 'out of the box' for MSVC2003 and newer. Therefore linking zlib statically
# seems to be preferable, especially if you build hptzip itself as dll.
ZLIBL = ../../hptzip/zlib-win32/zlib.lib
!else
ZLIBL = ../../hptzip/zlib-win32/zlib.lib
!endif
!endif
## programs ##
# C-Compiler
CC = cl
# archiver (for object-files)
AR = lib
# linker
LINK = link
#
RANLIB =
# remove file
RM = del
#copy a file
CP = copy
# rename a file
MV = move
# create directory
MKDIR = mkdir
## directories ##
!if $(DEBUG)==1
TOPDIR=../../Debug/
!else
TOPDIR=../../Release/
!endif
!ifndef JUSTDEFINES
!if [if not exist $(TOPDIR:/=\) $(MKDIR) $(TOPDIR:/=\)] == 0
OBJOUT2=$(TOPDIR)obj/
BINOUT=$(TOPDIR)bin/
LIBOUT=$(TOPDIR)lib/
!if [if not exist $(OBJOUT2:/=\) $(MKDIR) $(OBJOUT2:/=\)] != 0
OBJOUT2=
OBJOUT=
!endif
!if [if not exist $(BINOUT:/=\) $(MKDIR) $(BINOUT:/=\)] != 0
BINOUT=$(TOPDIR)
!endif
!if [if not exist $(LIBOUT:/=\) $(MKDIR) $(LIBOUT:/=\)] != 0
LIBOUT=$(TOPDIR)
!endif
!else
OBJOUT=
BINOUT=
LIBOUT=
!endif
!if "$(OBJOUT2)" != "" && "$(LIBNAME)" != ""
OBJOUT1=$(OBJOUT2)$(LIBNAME)/
!if [if not exist $(OBJOUT1:/=\) $(MKDIR) $(OBJOUT1:/=\)] == 0
OBJOUT=$(OBJOUT1)
!else
OBJOUT=$(OBJOUT2)
!endif
!endif
!endif
## macroses for makefile.inc ##
O=$(OBJOUT)
B=$(BINOUT)
L=$(LIBOUT)
H=$(H_DIR)
## file suffixes ##
_C = .c
_OBJ = .obj
_LIB = .lib
_EXE = .exe
_DLL = .dll
_EXP = .exp
_ILK = .ilk
_PDB = .pdb
## Library filename elements ##
# Prefix to construct static library name
LIBPREFIX=
# Prefix to construct dll name
DLLPREFIX=
# Suffix to construct library name
LIBSUFFIX=mvc
# Suffix to construct dll name
DLLSUFFIX=mvc
!if $(DEBUG)==1
LIBSUFFIX=$(LIBSUFFIX)d
DLLSUFFIX=$(DLLSUFFIX)d
!endif
IMPLIBPREFIX=imp_$(DLLPREFIX)
## Some common constructed filenames ##
PROGRAMSILK=$(PROGRAMS:.exe=.ilk)
PROGRAMSPDB=$(PROGRAMS:.exe=.pdb)
IMPLIBNAME=$(LIBOUT)$(IMPLIBPREFIX)$(LIBNAME)$(DLLSUFFIX)
DLLNAME=$(BINOUT)$(DLLPREFIX)$(LIBNAME)$(DLLSUFFIX)
DLLIMPORTLIB=$(IMPLIBNAME)$(_LIB)
#############################################################################
# program options
#############################################################################
# type of operating system (UNIX,MSDOS,OS2,WINNT)
# for BeOS, use UNIX!
OSTYPE=WINNT
# short name of operating system (used for PID lines etc.)
UNAME=WIN32
#UNAME=LNX
#UNAME=BSD
#UNAME=OS2
#UNAME=BEOS
# C-compiler: specify name of executable
EXENAMEOPT= -Fe
# C-compiler: specify name of object file
OBJNAMEOPT= -Fo
# LIB: specify output file name
LIBNAMEOPT= /out:
# LINK: specify output file name
LINKNAMEOPT= /OUT:
LINKPDBOPT= /PDB:
# C-compiler: options for compile only (link is off)
OBJOPT = -c
# C-compiler: generate warnings
WARNFLAGS=-Wall
# C-compiler: defines
CDEFS =-D__NT__ -D_CONSOLE $(HPTZIPD) $(PERLD) $(NTDEF)
!if $(DYNLIBS)==1
CDEFS = $(CDEFS) -D_MAKE_DLL
!endif
!if $(DEBUG)==1
DEBCDEFS =-D_DEBUG -DDEBUG -D_CRTDBG_MAP_ALLOC -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
!else
DEBCDEFS =-DNDEBUG -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
!endif
CFLAGS =-nologo
# C-compiler: debug
!if $(DEBUG)==1
# -Wall produces screenfulls of useless warnings about win header files unless the following warnings are omitted:
# c4255 == 'function' : no function prototype given: converting '()' to '(void)'
# c4668 == 'symbol' is not defined as a preprocessor macro, replacing with '0' for 'directives'
# c4820 == padding added into a struct
# other superfluous warnings:
# c4100 == unreferenced formal parameter
# c4005 == macro redefinition (crtdbg.h <=> msvc.h)
# c4826 == Conversion from 'const void *' to 'void *' is sign-extended. I have no clue what it means, but basetsd.h triggered it.
DEBCFLAGS=/nologo /Zi /GS /Wall /wd4668 /wd4255 /wd4820 /wd4100 /wd4005 /wd4826
!else
DEBCFLAGS=/nologo /W2
!endif
# It is not recommended to build dlls with static linkage against crt
# as it may cause problems with resource management.
# Check if it will actually work if you like.
!if $(STATICCRT)==1 && $(DYNLIBS)==0
# use /ML for mvc before 2005
!if $(DEBUG)==1
CFLAGS =$(CFLAGS) /MTd
!else
CFLAGS =$(CFLAGS) /MT
!endif
!else
!if $(DEBUG)==1
CFLAGS =$(CFLAGS) /MDd
!else
CFLAGS =$(CFLAGS) /MD
!endif
!endif
# C-compiler: optimization
!if $(OPTIMIZATION)==1
OPTCFLAGS=/O2 /Oi-
!else
OPTCFLAGS=/Od
!endif
CFLAGS =$(CFLAGS) $(DEBCFLAGS) $(OPTFLAGS) $(CDEFS) $(DEBCDEFS)
LFLAGS=/NOLOGO /LIBPATH:$(LIBOUT)
# object linker: optimization
!if $(OPTIMIZATION)==1
OPTLFLAGS=/OPT:REF
!else
OPTLFLAGS=/OPT:NOREF
!endif
# object linker: debug
!if $(DEBUG)==1
DEBLFLAGS=/DEBUG
!else
DEBLFLAGS=
!endif
COMMONLIBS=
# Common linker options
LFLAGS=$(LFLAGS) $(OPTLFLAGS) $(DEBLFLAGS) $(COMMONLIBS)
# Linker options passed via compiler command-line
CLFLAGS =/link $(LFLAGS)
# Linker options for building dll
LDLLFLAGS=$(LFLAGS) /DLL
# options for removing files (e.g. for clean, distclean, uninstall)
RMOPT =
# archiver options
ARFLAGS = /nologo
# options for creating directories
MKDIROPT=-p