GSS_S_PROMPTING_NEEDED is a bit
[cyrus-sasl.git] / win32 / common.mak
1 #Can this be autogenerated?
2 #Keep in sync with include/sasl.h and win32/include/config.h
3 SASL_VERSION_MAJOR=2
4 SASL_VERSION_MINOR=1
5 SASL_VERSION_STEP=23
6
7 # Uncomment the following line, if you want to use Visual Studio 6
8 #VCVER=6
9
10 # Define compiler/linker/etc.
11
12 CPP=cl.exe /nologo
13 LINK32=link.exe /nologo
14 LINK32DLL=$(LINK32) /dll
15 LINK32EXE=$(LINK32)
16
17 SYS_LIBS=ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
18
19 # Define the minimal Windows OS you want to run on:40 (NT), 50 (W2K), 51 (XP)
20 # Default is no restrictions. Currently we only check for 51 or later.
21 #TARGET_WIN_SYSTEM=51
22
23 !IF "$(TARGET_WIN_SYSTEM)" == ""
24 !IF "$(VERBOSE)" != "0"
25 !MESSAGE Applications and libraries should run on any Win32 system.
26 !ENDIF
27 TARGET_WIN_SYSTEM=0
28 !ENDIF
29
30 # prefix variable is currently only being used by install target
31 !IF "$(prefix)" == ""
32 prefix=C:\CMU
33 !IF "$(VERBOSE)" != "0"
34 !MESSAGE Default installation directory is $(prefix).
35 !ENDIF 
36 !ENDIF
37
38 !IF "$(CFG)" == ""
39 CFG=Release
40 !IF "$(VERBOSE)" != "0"
41 !MESSAGE No configuration specified. Defaulting to $(CFG).
42 !ENDIF
43 !ENDIF 
44
45 !IF "$(DB_LIB)" == ""
46 DB_LIB=libdb41s.lib
47 !IF "$(VERBOSE)" != "0"
48 !MESSAGE Defaulting SleepyCat library name to $(DB_LIB).
49 !ENDIF
50 !ENDIF
51
52 !IF "$(DB_INCLUDE)" == ""
53 DB_INCLUDE=c:\work\isode\db\build_win32
54 !IF "$(VERBOSE)" != "0"
55 !MESSAGE Defaulting SleepyCat include path to $(DB_INCLUDE).
56 !ENDIF
57 !ENDIF
58
59 !IF "$(DB_LIBPATH)" == ""
60 DB_LIBPATH=c:\work\isode\db\build_win32\Release_static
61 !IF "$(VERBOSE)" != "0"
62 !MESSAGE Defaulting SleepyCat library path to $(DB_LIBPATH).
63 !ENDIF
64 !ENDIF
65
66 !IF "$(OPENSSL_INCLUDE)" == ""
67 OPENSSL_INCLUDE="D:\openssl\engine-0.9.6g-md3\include"
68 !IF "$(VERBOSE)" != "0"
69 !MESSAGE Defaulting OpenSSL Include path to $(OPENSSL_INCLUDE).
70 !ENDIF
71 !ENDIF
72
73 !IF "$(OPENSSL_LIBPATH)" == ""
74 OPENSSL_LIBPATH="D:\openssl\engine-0.9.6g-md3\lib"
75 !IF "$(VERBOSE)" != "0"
76 !MESSAGE Defaulting OpenSSL library path to $(OPENSSL_LIBPATH).
77 !ENDIF
78 !ENDIF
79
80 !IF "$(GSSAPI_INCLUDE)" == ""
81 GSSAPI_INCLUDE="C:\Program Files\CyberSafe\Developer Pack\ApplicationSecuritySDK\include"
82 !IF "$(VERBOSE)" != "0"
83 !MESSAGE Defaulting GSSAPI Include path to $(GSSAPI_INCLUDE).
84 !ENDIF
85 !ENDIF
86
87 !IF "$(GSSAPI_LIBPATH)" == ""
88 GSSAPI_LIBPATH="C:\Program Files\CyberSafe\Developer Pack\ApplicationSecuritySDK\lib"
89 !IF "$(VERBOSE)" != "0"
90 !MESSAGE Defaulting GSSAPI library path to $(GSSAPI_LIBPATH).
91 !ENDIF
92 !ENDIF
93
94 !IF "$(SQLITE_INCLUDE)" == ""
95 SQLITE_INCLUDES=/I"C:\work\open_source\sqllite\sqlite\src" /I"C:\work\open_source\sqllite\sqlite\win32"
96 !IF "$(VERBOSE)" != "0"
97 !MESSAGE Defaulting SQLITE_INCLUDES includes to $(SQLITE_INCLUDES).
98 !ENDIF
99 !ENDIF
100
101 !IF "$(SQLITE_LIBPATH)" == ""
102 SQLITE_LIBPATH="C:\work\open_source\sqllite\sqlite\objs"
103 !IF "$(VERBOSE)" != "0"
104 !MESSAGE Defaulting SQLITE library path to $(SQLITE_LIBPATH).
105 !ENDIF
106 !ENDIF
107
108 !IF "$(LDAP_LIB_BASE)" == ""
109 LDAP_LIB_BASE = c:\work\open_source\openldap\openldap-head\ldap\Debug
110 !IF "$(VERBOSE)" != "0"
111 !MESSAGE Defaulting LDAP library path to $(LDAP_LIB_BASE).
112 !ENDIF
113 !ENDIF
114
115 !IF "$(LDAP_INCLUDE)" == ""
116 LDAP_INCLUDE = c:\work\open_source\openldap\openldap-head\ldap\include
117 !IF "$(VERBOSE)" != "0"
118 !MESSAGE Defaulting LDAP include path to $(LDAP_INCLUDE).
119 !ENDIF
120 !ENDIF
121
122 !IF "$(OS)" == "Windows_NT"
123 NULL=
124 !ELSE 
125 NULL=nul
126 !ENDIF
127
128
129 !IF  "$(CFG)" == "Release"
130
131 !IF "$(CODEGEN)" == ""
132 !IF "$(STATIC)" == "yes"
133 CODEGEN=/MT
134 !ELSE
135 CODEGEN=/MD
136 !ENDIF 
137 !IF "$(VERBOSE)" != "0"
138 !MESSAGE Codegeneration defaulting to $(CODEGEN).
139 !ENDIF 
140 !ENDIF 
141
142 !IF "$(VCVER)" != "6"
143 ENABLE_WIN64_WARNINGS=/Wp64
144 !ENDIF
145
146 CPP_PROJ= $(CODEGEN) /W3 /GX /O2 $(ENABLE_WIN64_WARNINGS) /Zi /D "NDEBUG" $(CPPFLAGS) /FD /c 
147
148 LINK32_FLAGS=/incremental:no /debug /machine:I386
149
150 !ELSEIF  "$(CFG)" == "Debug"
151
152 !IF "$(CODEGEN)" == ""
153 !IF "$(STATIC)" == "yes"
154 CODEGEN=/MTd
155 !ELSE
156 CODEGEN=/MDd
157 !ENDIF 
158 !IF "$(VERBOSE)" != "0"
159 !MESSAGE Codegeneration defaulting to $(CODEGEN).
160 !ENDIF 
161 !ENDIF 
162
163 CPP_PROJ=$(CODEGEN) /W3 /Gm /GX /ZI /Od /D "_DEBUG" $(CPPFLAGS) /FD /GZ /c 
164
165 LINK32_FLAGS=/incremental:yes /debug /machine:I386 /pdbtype:sept 
166
167 !ENDIF
168
169 LINK32DLL_FLAGS=$(LINK32_FLAGS) $(SYS_LIBS) $(EXTRA_LIBS)
170
171 # Assume we are only building console applications
172 LINK32EXE_FLAGS=/subsystem:console $(LINK32_FLAGS) $(SYS_LIBS) $(EXTRA_LIBS)
173