aboutsummaryrefslogtreecommitdiff
path: root/src/windows/identity/config/Makefile.w32
blob: d65d45d73635f53dccd211d9eac7625b9aed1349 (plain)
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
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
#
#  Khimaira : Win32 configuration makefile
#             This file will be included by all the makefiles
#             in the build tree.
#
# Copyright (c) 2004,2005,2006 Massachusetts Institute of Technology
# Copyright (c) 2006,2007 Secure Endpoints Inc.
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

!ifndef KHIMAIRA_WIN32_CONFIG
KHIMAIRA_WIN32_CONFIG=1

# Environment Variables
#  The following environment variables MUST be set:
#   KH_ROOT : Root of the source tree.
#   KH_BUILD: One of DEBUG or RETAIL
#
#  The following environment variables are optional:
#   KH_RUNTIME: One of STATIC or DLL, specifies whether the CRT libs
#               are linked statically or through MSVCRT.DLL.
#   KH_AUXCFLAGS: Optional flags for CL
#   KH_RELEASE: Release type.  One of OFFICIAL, PRERELEASE, PRIVATE or SPECIAL.
#      OFFICIAL   : An official release of Khimaira
#      PREPRELEASE: A beta/release candidate release
#      PRIVATE    : Private build
#      SPECIAL    : Special build.  Typically one with non-mainline patches.

# Version info
NETIDMGR_VERSION_MAJOR=1
NETIDMGR_VERSION_MINOR=2
NETIDMGR_VERSION_PATCH=0
NETIDMGR_VERSION_AUX=0
NETIDMGR_RELEASEDESC=

# The API version.  This number must be incremented each time the API
# changes.  Plugins specify the version of the API that they were
# compiled against and the Module Manager uses the API numbers to
# decide whether the plugin is safe to load or not.
#
# Changes to the API version numbers should be documented in
# apiversion.txt at the root of the source tree.
NETIDMGR_VERSION_API=8

# Minimum backwards compatible version.  API versions from
# NETIDMGR_VERSION_API_MINCOMPAT through NETIDMGR_VERSION_API
# inclusive, are compatible with this version.
NETIDMGR_VERSION_API_MINCOMPAT=5

NETIDMGR_VERSION=$(NETIDMGR_VERSION_MAJOR).$(NETIDMGR_VERSION_MINOR).$(NETIDMGR_VERSION_PATCH).$(NETIDMGR_VERSION_AUX)
NETIDMGR_VERSIONC=$(NETIDMGR_VERSION_MAJOR),$(NETIDMGR_VERSION_MINOR),$(NETIDMGR_VERSION_PATCH),$(NETIDMGR_VERSION_AUX)

# Source information
NETIDMGR_SRC_COMPANY_1033=Massachusetts Institute of Technology
NETIDMGR_SRC_COPYRIGHT_1033=(C) 2005,2006 Massachusetts Institute of Technology

# Choose the default build type if one is not set
!if ("$(KH_BUILD)" != "DEBUG") && ("$(KH_BUILD)" != "RETAIL")
!  if defined(NODEBUG) && "$(NODEBUG)"=="1"
KH_BUILD=RETAIL
!  else
KH_BUILD=DEBUG
!  endif
!endif

!if "$(KH_BUILD)"=="DEBUG" && defined(NODEBUG) && "$(NODEBUG)"=="1"
! error The Khimaira build configuration is set for DEBUG while the Platform SDK build environment is set to RETAIL.
!endif

# The default release type is PRIVATE is no other type is specified
!if ("$(KH_RELEASE)" != "OFFICIAL") && ("$(KH_RELEASE)" != "PRERELEASE") && ("$(KH_RELEASE)" != "PRIVATE") && ("$(KH_RELEASE)" != "SPECIAL")
KH_RELEASE=PRIVATE
!endif

# Actual build environment settings

# See what compiler we are using
# TODO: Update this to support other compilers
!if defined(MSVCVer) && "$(MSVCVer)"=="8.0"
KH_CLVER=vc8
!else
KH_CLVER=vc7
!endif

# Check for required env vars
!ifndef MODULE
!	error MODULE must be specified
!endif
!ifndef KH_ROOT
! ifndef PISMERE
!   error Either KH_ROOT or PISMERE must be defined
! else
KH_ROOT=$(PISMERE)\athena\auth\krb5\src\windows\identity
! endif
!endif

!ifdef NODEBUG
OUTPRE_DBG=rel
!else
OUTPRE_DBG=dbg
!endif
OUTPRE1=obj
OUTPRE2=$(OUTPRE1)\$(CPU)
OUTPRE3=$(OUTPRE2)\$(OUTPRE_DBG)
OUTPRE=$(OUTPRE3)^\



# Output directory structure
DESTROOT=$(KH_ROOT)\obj
OBJROOT=$(KH_ROOT)\obj
SRC=$(KH_ROOT)

DESTDIR=$(DESTROOT)\$(CPU)\$(OUTPRE_DBG)
OBJDIR=$(OBJROOT)\$(CPU)\$(OUTPRE_DBG)

OBJ=$(OBJDIR)\$(MODULE)
INCDIR=$(DESTDIR)\inc
#BINDIR=$(DESTDIR)\bin
BINDIR=$(KH_ROOT)\$(OUTPRE)
#LIBDIR=$(DESTDIR)\lib
LIBDIR=$(KH_ROOT)\$(OUTPRE)
DOCDIR=$(DESTDIR)\doc

# Source directories
CONFDIR=$(SRC)\config

# If we are forcing a Win2K build, we need to adjust the build
# directories and environment.

!ifdef KHBUILD_W2K

OBJ=$(OBJ)\W2K
BINDIR=$(BINDIR)\W2K
LIBDIR=$(LIBDIR)\W2K

APPVER=5.0
TARGETOS=WINNT
_WIN32_IE=0x0500
_WIN32_WINNT=0x0500

!endif

# Setup environment for win32.mak

!if "$(KH_BUILD)" == "RETAIL"
NODEBUG=1
!endif

# Win32.mak

!include <Win32.Mak>

# Program macros

CD=cd
RM=del /q
MKDIR=mkdir
RMDIR=rmdir
ECHO=echo
MAKECMD=nmake /nologo
CP=copy /y
LINK=link
CCSV=perl $(SRC)\config\ccsv.pl
MC=mc

!ifdef KH_DOXYFULLPATH
DOXYGEN=$(KH_DOXYFULLPATH)
!else
DOXYGEN=doxygen
!endif

!ifdef KH_HHCFULLPATH
HHC=$(KH_HHCFULLPATH)
!else
HHC=hhc
!endif

!ifdef KH_KFWPATH
KFWINCDIR=$(KH_KFWPATH)\inc
kfwincflags = -I$(KFWINCDIR)\krb5 -I$(KFWINCDIR)\krb5\KerberosIV -I$(KFWINCDIR)\krb4 -I$(KFWINCDIR)\loadfuncs -I$(KFWINCDIR)
KFWLIBDIR=$(KH_KFWPATH)\lib\$(CPU)
!else if defined(PISMERE)
KFWINCDIR=$(PISMERE)\athena\auth\krb5\src\include
kfwincflags = -I$(KFWINCDIR) -I$(PISMERE)\athena\util\loadfuncs -I$(PISMERE)\athena\auth\krb5\src\include\kerberosIV -I$(PISMERE)\athena\auth\krb4\include
KFWLIBDIR=$(PISMERE)\target\lib\$(CPU)\$(OUTPRE_DBG)
!endif

!ifdef KH_AFSPATH
AFSINCDIR=$(KH_AFSPATH)\include
AFSLIBDIR=$(KH_AFSPATH)\lib
afsincflags=-I$(AFSINCDIR)
!endif

#EXTLIBDIR=$(SRC)\ext-lib\$(CPU)
#EXTINCDIR=-I$(SRC)\ext-inc

incflags= -I$(INCDIR) -I$(SRC)\include -I. -I$(OBJ) $(kfwincflags) $(afsincflags)
rincflags= /i $(INCDIR) /i $(SRC)\include /i .
khdefines=-DUNICODE -D_UNICODE
khcwarn=/Wp64
!ifndef KH_NO_WX
khcwarn=$(khcwarn) /WX
!endif

!if "$(CPU)" == "i386"
khdefines=$(khdefines) -D_USE_32BIT_TIME_T
!endif

#DEBUG_SYMBOLS
ldebug=$(ldebug) /DEBUG
cdebug=$(cdebug) -Os -Zi

# Additionally, suppress conflicting default library directives that we
# might pull in from external libraries.

!ifndef NODEBUG
lndeflibflag=/NODEFAULTLIB:MSVCRT
!else
lndeflibflag=/NODEFAULTLIB:MSVCRTD
!endif

khcflags=$(cdebug) $(cflags) $(incflags) $(khdefines) $(khcwarn)
khlguiflags=$(ldebug) $(guilflags) $(lndeflibflag)
khlconflags=$(ldebug) $(conlflags) $(lndeflibflag)
khldllguiflags=$(ldebug) $(dlllflags) $(lndeflibflag)
khldllconflags=$(ldebug) $(dlllflags) $(lndeflibflag)

!if "$(KH_RUNTIME)" == "STATIC"
khcflags=$(khcflags) $(cvarsmt)
khlguiflags=$(khlguiflags) $(guilibsmt)
khlconflags=$(khlconflags) $(conlibsmt)
khldllguiflags=$(khldllguiflags) $(guilibsmt)
khldllconflags=$(khldllconflags) $(conlibsmt)
!else
khcflags=$(khcflags) $(cvarsdll)
khlguiflags=$(khlguiflags) $(guilibsdll)
khlconflags=$(khlconflags) $(conlibsdll)
khldllguiflags=$(khldllguiflags) $(guilibsdll)
khldllconflags=$(khldllconflags) $(conlibsdll)
!endif

C2OBJ=$(CC) $(khcflags) $(KH_AUXCFLAGS) /Fo"$@" /c $**

EXECONLINK=$(LINK) /NOLOGO $(khlconflags) /OUT:$@ $**

EXEGUILINK=$(LINK) /NOLOGO $(khlguiflags) /OUT:$@ $**

DLLCONLINK=$(LINK) /NOLOGO $(khldllconflags) /OUT:$@ /IMPLIB:$(LIBDIR)\$(@B).lib $**

DLLGUILINK=$(LINK) /NOLOGO $(khldllguiflags) /OUT:$@ /IMPLIB:$(LIBDIR)\$(@B).lib $**

DLLRESLINK=$(LINK) /NOLOGO /DLL /NOENTRY /MACHINE:$(PROCESSOR_ARCHITECTURE) /OUT:$@ $**

RC2RES=$(RC) $(RFLAGS) $(rincflags) /fo $@ $**

MC2RC=$(MC) $(MCFLAGS) -h $(OBJ)\ -m 1024 -r $(OBJ)\ -x $(OBJ)\ $**

{}.c{$(OBJ)}.obj:
	$(C2OBJ)

{$(OBJ)}.c{$(OBJ)}.obj:
	$(C2OBJ)

{}.h{$(INCDIR)}.h:
	$(CP) $** $@

{}.rc{$(OBJ)}.res:
	$(RC2RES)

{$(OBJ)}.rc{$(OBJ)}.res:
	$(RC2RES)

clean::
!if exist($(OBJ))
	$(RM) $(OBJ)\
!endif

test::

mkdirs::
!if !exist($(OBJ))
	$(MKDIR) $(OBJ)
!endif

TAGFILE = $(SRC)\TAGS

etag::
	etags -o $(TAGFILE) -a *.c *.h

.SUFFIXES: .h

#
# Manifest handling
#
# Starting with Visual Studio 8, the C compiler and the linker
# generate manifests so that the applications will link with the
# correct side-by-side DLLs at run-time.  These are required for
# correct operation under Windows XP.  We also have custom manifests
# which need to be merged with the manifests that VS creates.
#
# The syntax for invoking the _VC_MANIFEST_EMBED_foo macro is:
# $(_VC_MANIFEST_EMBED_???) <any additional manifests that need to be merged in>
#

!ifndef MT
MT=mt.exe -nologo
!endif

_VC_MANIFEST_EMBED_EXE= \
if exist $@.manifest $(MT) -outputresource:$@;1 -manifest $@.manifest

_VC_MANIFEST_EMBED_DLL= \
if exist $@.manifest $(MT) -outputresource:$@;2 -manifest $@.manifest

# Note that if you are merging manifests, then the VS generated
# manifest should be cleaned up after calling _VC_MANIFEST_EMBED_???.
# This ensures that even if the DLL or EXE is executed in-place, the
# embedded manifest will be used.  Otherwise the $@.manifest file will
# be used.
_VC_MANIFEST_CLEAN= \
if exist $@.manifest $(RM) $@.manifest

# End of manifest handling

!endif