GSS_S_PROMPTING_NEEDED is a bit
[cyrus-sasl.git] / lib / NTMakefile
1 !INCLUDE ..\win32\common.mak
2
3 # WS2tcpip.h included in Visual Studio 7 provides getaddrinfo, ...
4 # emulation on Windows, so there is no need to build getaddrinfo.c
5
6 !IF "$(VCVER)" == "6"
7 compat_sources = getaddrinfo.c getnameinfo.c
8 compat_objs = getaddrinfo.obj getnameinfo.obj
9 !ENDIF
10
11
12 libsasl_sources = auxprop.c canonusr.c checkpw.c client.c common.c config.c external.c md5.c saslutil.c server.c seterror.c windlopen.c getsubopt.c plugin_common.c plugin_common.h $(compat_sources)
13 libsasl_objs = auxprop.obj canonusr.obj checkpw.obj client.obj common.obj config.obj external.obj md5.obj saslutil.obj server.obj seterror.obj windlopen.obj getsubopt.obj plugin_common.obj $(compat_objs)
14 libsasl_res = libsasl.res
15 libsasl_out = libsasl.dll libsasl.exp libsasl.lib $(libsasl_res)
16
17 CPPFLAGS = /D NEED_GETOPT /I "..\win32\include" /I "." /I "..\include" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBSASL_EXPORTS"
18
19 !IF $(TARGET_WIN_SYSTEM) >= 51
20 CPPFLAGS = /D TARGET_WIN_SYSTEM=$(TARGET_WIN_SYSTEM) $(CPPFLAGS)
21 !ENDIF 
22
23 all_objs = $(libsasl_objs)
24 all_out = $(libsasl_out)
25
26 libdir = $(prefix)\lib
27 bindir = $(prefix)\bin
28 exclude_list = binexclude.lst
29
30 all: all-recursive
31
32 #
33 # /I flag to xcopy tells to treat the last parameter as directory and create all missing levels
34 #
35 # In order to force xcopy not to confirm if the second parameter is file or directory,
36 # the first parameter has to contain a wildcard character. For example, we use libsasl.l*,
37 # instead of libsasl.lib. Ugly, but works!
38 #
39 install: libsasl.dll
40         @echo libsasl.exp > $(exclude_list)
41         @echo libsasl.lib >> $(exclude_list)
42         @echo libsasl.res >> $(exclude_list)
43         @xcopy libsasl.* $(bindir) /I /F /Y /EXCLUDE:$(exclude_list)
44         @xcopy libsasl.l* $(libdir) /I /F /Y
45
46 all-recursive: libsasl.dll
47
48 libsasl.dll: $(libsasl_objs) $(libsasl_res)
49         $(LINK32DLL) @<< $(LINK32DLL_FLAGS) /out:"libsasl.dll" /implib:"libsasl.lib" /pdb:"libsasl.pdb" $(libsasl_objs) $(libsasl_res)
50 <<
51
52 plugin_common.c: ..\plugins\plugin_common.c plugin_common.h
53         copy ..\plugins\plugin_common.c .
54
55 plugin_common.h: ..\plugins\plugin_common.h
56         copy ..\plugins\plugin_common.h .
57
58 client.c common.c external.c plugin_common.c server.c seterror.c: ..\include\saslplug.h
59
60 CLEAN :
61         -@erase $(all_objs)
62         -@erase "*.idb"
63         -@erase "*.pdb"
64         -@erase $(all_out)
65         -@erase plugin_common.h
66         -@erase plugin_common.c
67         -@erase $(exclude_list)
68
69 $(libsasl_res): NTMakefile
70         rc /fo"$(libsasl_res)" <<
71 #include "afxres.h"
72
73 VS_VERSION_INFO VERSIONINFO
74  FILEVERSION $(SASL_VERSION_MAJOR),$(SASL_VERSION_MINOR),$(SASL_VERSION_STEP),0
75  PRODUCTVERSION $(SASL_VERSION_MAJOR),$(SASL_VERSION_MINOR),$(SASL_VERSION_STEP),0
76  FILEFLAGSMASK 0x3fL
77 #ifdef _DEBUG
78  FILEFLAGS 0x1L
79 #else
80  FILEFLAGS 0x0L
81 #endif
82  FILEOS 0x40004L
83  FILETYPE 0x1L
84  FILESUBTYPE 0x0L
85 BEGIN
86     BLOCK "StringFileInfo"
87     BEGIN
88         BLOCK "040904b0"
89         BEGIN
90             VALUE "CompanyName", "Carnegie Mellon University\0"
91             VALUE "FileDescription", "CMU SASL API v2\0"
92             VALUE "FileVersion", "$(SASL_VERSION_MAJOR).$(SASL_VERSION_MINOR).$(SASL_VERSION_STEP).0\0"
93             VALUE "InternalName", "libsasl\0"
94             VALUE "LegalCopyright", "Copyright (c) Carnegie Mellon University 2005\0"
95             VALUE "OriginalFilename", "libsasl.dll\0"
96             VALUE "ProductName", "Carnegie Mellon University SASL\0"
97             VALUE "ProductVersion", "$(SASL_VERSION_MAJOR).$(SASL_VERSION_MINOR).$(SASL_VERSION_STEP)-0"
98         END
99     END
100     BLOCK "VarFileInfo"
101     BEGIN
102         VALUE "Translation", 0x409, 1200
103     END
104 END
105 <<
106
107 .c.obj::
108    $(CPP) @<<
109    $(CPP_PROJ) $< 
110 <<
111
112 .cpp.obj::
113    $(CPP) @<<
114    $(CPP_PROJ) $< 
115 <<
116
117 .cxx.obj::
118    $(CPP) @<<
119    $(CPP_PROJ) $< 
120 <<