2
# Khimaira : Win32 configuration makefile
3
# This file will be included by all the makefiles
6
# Copyright (c) 2004,2005 Massachusetts Institute of Technology
8
# Permission is hereby granted, free of charge, to any person
9
# obtaining a copy of this software and associated documentation files
10
# (the "Software"), to deal in the Software without restriction,
11
# including without limitation the rights to use, copy, modify, merge,
12
# publish, distribute, sublicense, and/or sell copies of the Software,
13
# and to permit persons to whom the Software is furnished to do so,
14
# subject to the following conditions:
16
# The above copyright notice and this permission notice shall be
17
# included in all copies or substantial portions of the Software.
19
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
22
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
23
# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
24
# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
25
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
!ifndef KHIMAIRA_WIN32_CONFIG
29
KHIMAIRA_WIN32_CONFIG=1
31
# Environment Variables
32
# The following environment variables MUST be set:
33
# KH_ROOT : Root of the source tree.
34
# KH_BUILD: One of DEBUG or RETAIL
36
# The following environment variables are optional:
37
# KH_RUNTIME: One of STATIC or DLL, specifies whether the CRT libs
38
# are linked statically or through MSVCRT.DLL.
39
# KH_AUXCFLAGS: Optional flags for CL
40
# KH_RELEASE: Release type. One of OFFICIAL, PRERELEASE, PRIVATE or SPECIAL.
41
# OFFICIAL : An official release of Khimaira
42
# PREPRELEASE: A beta/release candidate release
43
# PRIVATE : Private build
44
# SPECIAL : Special build. Typically one with non-mainline patches.
47
NETIDMGR_VERSION_MAJOR=1
48
NETIDMGR_VERSION_MINOR=1
49
NETIDMGR_VERSION_PATCH=0
50
NETIDMGR_VERSION_AUX=1
53
# The API version. This number must be incremented each time the API
54
# changes. Plugins specify the version of the API that they were
55
# compiled against and the Module Manager uses the API numbers to
56
# decide whether the plugin is safe to load or not.
58
# Changes to the API version numbers should be documented in
59
# apiversion.txt at the root of the source tree.
60
NETIDMGR_VERSION_API=5
62
# Minimum backwards compatible version. API versions from
63
# NETIDMGR_VERSION_API_MINCOMPAT through NETIDMGR_VERSION_API
64
# inclusive, are compatible with this version.
65
NETIDMGR_VERSION_API_MINCOMPAT=5
67
NETIDMGR_VERSION=$(NETIDMGR_VERSION_MAJOR).$(NETIDMGR_VERSION_MINOR).$(NETIDMGR_VERSION_PATCH).$(NETIDMGR_VERSION_AUX)
68
NETIDMGR_VERSIONC=$(NETIDMGR_VERSION_MAJOR),$(NETIDMGR_VERSION_MINOR),$(NETIDMGR_VERSION_PATCH),$(NETIDMGR_VERSION_AUX)
71
NETIDMGR_SRC_COMPANY_1033=Massachusetts Institute of Technology
72
NETIDMGR_SRC_COPYRIGHT_1033=(C) 2005 Massachusetts Institute of Technology
74
# Choose the default build type if one is not set
75
!if ("$(KH_BUILD)" != "DEBUG") && ("$(KH_BUILD)" != "RETAIL")
76
! if defined(NODEBUG) && "$(NODEBUG)"=="1"
83
!if "$(KH_BUILD)"=="DEBUG" && defined(NODEBUG) && "$(NODEBUG)"=="1"
84
! error The Khimaira build configuration is set for DEBUG while the Platform SDK build environment is set to RETAIL.
87
# The default release type is PRIVATE is no other type is specified
88
!if ("$(KH_RELEASE)" != "OFFICIAL") && ("$(KH_RELEASE)" != "PRERELEASE") && ("$(KH_RELEASE)" != "PRIVATE") && ("$(KH_RELEASE)" != "SPECIAL")
92
# Actual build environment settings
94
# See what compiler we are using
95
# TODO: Update this to support other compilers
96
!if defined(MSVCVer) && "$(MSVCVer)"=="8.0"
102
# Check for required env vars
104
! error MODULE must be specified
108
! error Either KH_ROOT or PISMERE must be defined
110
KH_ROOT=$(PISMERE)\athena\auth\krb5\src\windows\identity
120
OUTPRE2=$(OUTPRE1)\$(CPU)
121
OUTPRE3=$(OUTPRE2)\$(OUTPRE_DBG)
126
# Output directory structure
127
DESTROOT=$(KH_ROOT)\obj
128
OBJROOT=$(KH_ROOT)\obj
131
DESTDIR=$(DESTROOT)\$(CPU)\$(OUTPRE_DBG)
132
OBJDIR=$(OBJROOT)\$(CPU)\$(OUTPRE_DBG)
134
OBJ=$(OBJDIR)\$(MODULE)
135
INCDIR=$(DESTDIR)\inc
136
#BINDIR=$(DESTDIR)\bin
137
BINDIR=$(KH_ROOT)\$(OUTPRE)\W2K
138
#LIBDIR=$(DESTDIR)\lib
139
LIBDIR=$(KH_ROOT)\$(OUTPRE)\W2K
140
DOCDIR=$(DESTDIR)\doc
143
CONFDIR=$(SRC)\config
145
# Setup environment for win32.mak
147
!if "$(KH_BUILD)" == "RETAIL"
165
MAKECMD=nmake /nologo
168
CCSV=perl $(SRC)\config\ccsv.pl
171
!ifdef KH_DOXYFULLPATH
172
DOXYGEN=$(KH_DOXYFULLPATH)
177
!ifdef KH_HHCFULLPATH
178
HHC=$(KH_HHCFULLPATH)
184
KFWINCDIR=$(KH_KFWPATH)\inc
185
kfwincflags = -I$(KFWINCDIR)\krb5 -I$(KFWINCDIR)\krb5\KerberosIV -I$(KFWINCDIR)\krb4 -I$(KFWINCDIR)\loadfuncs -I$(KFWINCDIR)
186
KFWLIBDIR=$(KH_KFWPATH)\lib\$(CPU)
187
!else if defined(PISMERE)
188
KFWINCDIR=$(PISMERE)\athena\auth\krb5\src\include
189
kfwincflags = -I$(KFWINCDIR) -I$(PISMERE)\athena\util\loadfuncs -I$(PISMERE)\athena\auth\krb5\src\include\kerberosIV -I$(PISMERE)\athena\auth\krb4\include
190
KFWLIBDIR=$(PISMERE)\target\lib\$(CPU)\$(OUTPRE_DBG)
194
AFSINCDIR=$(KH_AFSPATH)\include
195
AFSLIBDIR=$(KH_AFSPATH)\lib
196
afsincflags=-I$(AFSINCDIR)
199
#EXTLIBDIR=$(SRC)\ext-lib\$(CPU)
200
#EXTINCDIR=-I$(SRC)\ext-inc
202
incflags= -I$(INCDIR) -I$(SRC)\include -I. -I$(OBJ) $(kfwincflags) $(afsincflags)
203
rincflags= /i $(INCDIR) /i $(SRC)\include /i .
204
khdefines=-DUNICODE -D_UNICODE
207
khcwarn=$(khcwarn) /WX
211
ldebug=$(ldebug) /DEBUG
212
cdebug=$(cdebug) -Os -Zi
214
# Additionally, suppress conflicting default library directives that we
215
# might pull in from external libraries.
218
lndeflibflag=/NODEFAULTLIB:MSVCRT
220
lndeflibflag=/NODEFAULTLIB:MSVCRTD
223
khcflags=$(cdebug) $(cflags) $(incflags) $(khdefines) $(khcwarn)
224
khlguiflags=$(ldebug) $(guilflags) $(lndeflibflag)
225
khlconflags=$(ldebug) $(conlflags) $(lndeflibflag)
226
khldllguiflags=$(ldebug) $(dlllflags) $(lndeflibflag)
227
khldllconflags=$(ldebug) $(dlllflags) $(lndeflibflag)
229
!if "$(KH_RUNTIME)" == "STATIC"
230
khcflags=$(khcflags) $(cvarsmt)
231
khlguiflags=$(khlguiflags) $(guilibsmt)
232
khlconflags=$(khlconflags) $(conlibsmt)
233
khldllguiflags=$(khldllguiflags) $(guilibsmt)
234
khldllconflags=$(khldllconflags) $(conlibsmt)
236
khcflags=$(khcflags) $(cvarsdll)
237
khlguiflags=$(khlguiflags) $(guilibsdll)
238
khlconflags=$(khlconflags) $(conlibsdll)
239
khldllguiflags=$(khldllguiflags) $(guilibsdll)
240
khldllconflags=$(khldllconflags) $(conlibsdll)
243
C2OBJ=$(CC) $(khcflags) $(KH_AUXCFLAGS) /Fo"$@" /c $**
245
EXECONLINK=$(LINK) /NOLOGO $(khlconflags) /OUT:$@ $**
247
EXEGUILINK=$(LINK) /NOLOGO $(khlguiflags) /OUT:$@ $**
249
DLLCONLINK=$(LINK) /NOLOGO $(khldllconflags) /OUT:$@ /IMPLIB:$(LIBDIR)\$(@B).lib $**
251
DLLGUILINK=$(LINK) /NOLOGO $(khldllguiflags) /OUT:$@ /IMPLIB:$(LIBDIR)\$(@B).lib $**
253
DLLRESLINK=$(LINK) /NOLOGO /DLL /NOENTRY /MACHINE:$(PROCESSOR_ARCHITECTURE) /OUT:$@ $**
255
RC2RES=$(RC) $(RFLAGS) $(rincflags) /fo $@ $**
257
MC2RC=$(MC) $(MCFLAGS) -h $(OBJ)\ -m 1024 -r $(OBJ)\ -x $(OBJ)\ $**
262
{$(OBJ)}.c{$(OBJ)}.obj:
271
{$(OBJ)}.rc{$(OBJ)}.res:
282
!if !exist($(LIBDIR))
285
!if !exist($(BINDIR))
292
TAGFILE = $(SRC)\TAGS
295
etags -o $(TAGFILE) -a *.c *.h
2
# Khimaira : Win32 configuration makefile
3
# This file will be included by all the makefiles
6
# Copyright (c) 2004,2005,2006 Massachusetts Institute of Technology
7
# Copyright (c) 2006,2007 Secure Endpoints Inc.
9
# Permission is hereby granted, free of charge, to any person
10
# obtaining a copy of this software and associated documentation files
11
# (the "Software"), to deal in the Software without restriction,
12
# including without limitation the rights to use, copy, modify, merge,
13
# publish, distribute, sublicense, and/or sell copies of the Software,
14
# and to permit persons to whom the Software is furnished to do so,
15
# subject to the following conditions:
17
# The above copyright notice and this permission notice shall be
18
# included in all copies or substantial portions of the Software.
20
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
24
# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
25
# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
26
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29
!ifndef KHIMAIRA_WIN32_CONFIG
30
KHIMAIRA_WIN32_CONFIG=1
32
# Environment Variables
33
# The following environment variables MUST be set:
34
# KH_ROOT : Root of the source tree.
35
# KH_BUILD: One of DEBUG or RETAIL
37
# The following environment variables are optional:
38
# KH_RUNTIME: One of STATIC or DLL, specifies whether the CRT libs
39
# are linked statically or through MSVCRT.DLL.
40
# KH_AUXCFLAGS: Optional flags for CL
41
# KH_RELEASE: Release type. One of OFFICIAL, PRERELEASE, PRIVATE or SPECIAL.
42
# OFFICIAL : An official release of Khimaira
43
# PREPRELEASE: A beta/release candidate release
44
# PRIVATE : Private build
45
# SPECIAL : Special build. Typically one with non-mainline patches.
48
NETIDMGR_VERSION_MAJOR=1
49
NETIDMGR_VERSION_MINOR=3
50
NETIDMGR_VERSION_PATCH=1
51
NETIDMGR_VERSION_AUX=0
54
# The API version. This number must be incremented each time the API
55
# changes. Plugins specify the version of the API that they were
56
# compiled against and the Module Manager uses the API numbers to
57
# decide whether the plugin is safe to load or not.
59
# Changes to the API version numbers should be documented in
60
# apiversion.txt at the root of the source tree.
61
NETIDMGR_VERSION_API=10
63
# Minimum backwards compatible version. API versions from
64
# NETIDMGR_VERSION_API_MINCOMPAT through NETIDMGR_VERSION_API
65
# inclusive, are compatible with this version.
66
NETIDMGR_VERSION_API_MINCOMPAT=5
68
NETIDMGR_VERSION=$(NETIDMGR_VERSION_MAJOR).$(NETIDMGR_VERSION_MINOR).$(NETIDMGR_VERSION_PATCH).$(NETIDMGR_VERSION_AUX)
69
NETIDMGR_VERSIONC=$(NETIDMGR_VERSION_MAJOR),$(NETIDMGR_VERSION_MINOR),$(NETIDMGR_VERSION_PATCH),$(NETIDMGR_VERSION_AUX)
72
NETIDMGR_SRC_COMPANY_1033=Massachusetts Institute of Technology
73
NETIDMGR_SRC_COPYRIGHT_1033=(C) 2005-2007 Massachusetts Institute of Technology
75
# Choose the default build type if one is not set
76
!if ("$(KH_BUILD)" != "DEBUG") && ("$(KH_BUILD)" != "RETAIL")
77
! if defined(NODEBUG) && "$(NODEBUG)"=="1"
84
!if "$(KH_BUILD)"=="DEBUG" && defined(NODEBUG) && "$(NODEBUG)"=="1"
85
! error The Khimaira build configuration is set for DEBUG while the Platform SDK build environment is set to RETAIL.
88
# The default release type is PRIVATE is no other type is specified
89
!if ("$(KH_RELEASE)" != "OFFICIAL") && ("$(KH_RELEASE)" != "PRERELEASE") && ("$(KH_RELEASE)" != "PRIVATE") && ("$(KH_RELEASE)" != "SPECIAL")
93
# Actual build environment settings
95
# See what compiler we are using
96
# TODO: Update this to support other compilers
97
!if defined(MSVCVer) && "$(MSVCVer)"=="8.0"
103
# Check for required env vars
105
! error MODULE must be specified
109
! error Either KH_ROOT or PISMERE must be defined
111
KH_ROOT=$(PISMERE)\athena\auth\krb5\src\windows\identity
121
OUTPRE2=$(OUTPRE1)\$(CPU)
122
OUTPRE3=$(OUTPRE2)\$(OUTPRE_DBG)
127
# Output directory structure
128
DESTROOT=$(KH_ROOT)\obj
129
OBJROOT=$(KH_ROOT)\obj
132
DESTDIR=$(DESTROOT)\$(CPU)\$(OUTPRE_DBG)
133
OBJDIR=$(OBJROOT)\$(CPU)\$(OUTPRE_DBG)
135
OBJ=$(OBJDIR)\$(MODULE)
136
INCDIR=$(DESTDIR)\inc
137
#BINDIR=$(DESTDIR)\bin
138
BINDIR=$(KH_ROOT)\$(OUTPRE)\W2K
139
#LIBDIR=$(DESTDIR)\lib
140
LIBDIR=$(KH_ROOT)\$(OUTPRE)\W2K
141
DOCDIR=$(DESTDIR)\doc
144
CONFDIR=$(SRC)\config
146
# Setup environment for win32.mak
148
!if "$(KH_BUILD)" == "RETAIL"
166
MAKECMD=nmake /nologo
169
CCSV=perl $(SRC)\config\ccsv.pl
172
!ifdef KH_DOXYFULLPATH
173
DOXYGEN=$(KH_DOXYFULLPATH)
178
!ifdef KH_HHCFULLPATH
179
HHC=$(KH_HHCFULLPATH)
185
KFWINCDIR=$(KH_KFWPATH)\inc
186
kfwincflags = -I$(KFWINCDIR)\krb5 -I$(KFWINCDIR)\krb5\KerberosIV -I$(KFWINCDIR)\krb4 -I$(KFWINCDIR)\loadfuncs -I$(KFWINCDIR)
187
KFWLIBDIR=$(KH_KFWPATH)\lib\$(CPU)
188
!else if defined(PISMERE)
189
KFWINCDIR=$(PISMERE)\athena\auth\krb5\src\include
190
kfwincflags = -I$(KFWINCDIR) -I$(PISMERE)\athena\util\loadfuncs -I$(PISMERE)\athena\auth\krb5\src\include\kerberosIV -I$(PISMERE)\athena\auth\krb4\include
191
KFWLIBDIR=$(PISMERE)\target\lib\$(CPU)\$(OUTPRE_DBG)
195
AFSINCDIR=$(KH_AFSPATH)\include
196
AFSLIBDIR=$(KH_AFSPATH)\lib
197
afsincflags=-I$(AFSINCDIR)
200
#EXTLIBDIR=$(SRC)\ext-lib\$(CPU)
201
#EXTINCDIR=-I$(SRC)\ext-inc
203
incflags= -I$(INCDIR) -I$(SRC)\include -I. -I$(OBJ) $(kfwincflags) $(afsincflags)
204
rincflags= /i $(INCDIR) /i $(SRC)\include /i .
205
khdefines=-DUNICODE -D_UNICODE
208
khcwarn=$(khcwarn) /WX
211
!if "$(CPU)" == "i386"
212
khdefines=$(khdefines) -D_USE_32BIT_TIME_T
216
ldebug=$(ldebug) /DEBUG
217
cdebug=$(cdebug) -Os -Zi
219
# Additionally, suppress conflicting default library directives that we
220
# might pull in from external libraries.
223
lndeflibflag=/NODEFAULTLIB:MSVCRT
225
lndeflibflag=/NODEFAULTLIB:MSVCRTD
228
khcflags=$(cdebug) $(cflags) $(incflags) $(khdefines) $(khcwarn)
229
khlguiflags=$(ldebug) $(guilflags) $(lndeflibflag)
230
khlconflags=$(ldebug) $(conlflags) $(lndeflibflag)
231
khldllguiflags=$(ldebug) $(dlllflags) $(lndeflibflag)
232
khldllconflags=$(ldebug) $(dlllflags) $(lndeflibflag)
234
!if "$(KH_RUNTIME)" == "STATIC"
235
khcflags=$(khcflags) $(cvarsmt)
236
khlguiflags=$(khlguiflags) $(guilibsmt)
237
khlconflags=$(khlconflags) $(conlibsmt)
238
khldllguiflags=$(khldllguiflags) $(guilibsmt)
239
khldllconflags=$(khldllconflags) $(conlibsmt)
241
khcflags=$(khcflags) $(cvarsdll)
242
khlguiflags=$(khlguiflags) $(guilibsdll)
243
khlconflags=$(khlconflags) $(conlibsdll)
244
khldllguiflags=$(khldllguiflags) $(guilibsdll)
245
khldllconflags=$(khldllconflags) $(conlibsdll)
248
C2OBJ=$(CC) $(khcflags) $(KH_AUXCFLAGS) /Fo"$@" /c $**
250
EXECONLINK=$(LINK) /NOLOGO $(khlconflags) /OUT:$@ $**
252
EXEGUILINK=$(LINK) /NOLOGO $(khlguiflags) /OUT:$@ $**
254
DLLCONLINK=$(LINK) /NOLOGO $(khldllconflags) /OUT:$@ /IMPLIB:$(LIBDIR)\$(@B).lib $**
256
DLLGUILINK=$(LINK) /NOLOGO $(khldllguiflags) /OUT:$@ /IMPLIB:$(LIBDIR)\$(@B).lib $**
258
DLLRESLINK=$(LINK) /NOLOGO /DLL /NOENTRY /MACHINE:$(PROCESSOR_ARCHITECTURE) /OUT:$@ $**
260
RC2RES=$(RC) $(RFLAGS) $(rincflags) /fo $@ $**
262
MC2RC=$(MC) $(MCFLAGS) -h $(OBJ)\ -m 1024 -r $(OBJ)\ -x $(OBJ)\ $**
267
{$(OBJ)}.c{$(OBJ)}.obj:
276
{$(OBJ)}.rc{$(OBJ)}.res:
283
if exist vc70.pdb $(RM) vc70.pdb
284
if exist vc80.pdb $(RM) vc80.pdb
289
!if !exist($(LIBDIR))
292
!if !exist($(BINDIR))
299
TAGFILE = $(SRC)\TAGS
302
etags -o $(TAGFILE) -a *.c *.h