1 # makefile: Constructs the Kerberos for Windows CCAPI DLL.
3 OBJS = $(OUTPRE)ccapi_ccache.obj \
4 $(OUTPRE)ccapi_ccache_iterator.obj \
5 $(OUTPRE)ccapi_context.obj \
6 $(OUTPRE)ccapi_context_change_time.obj \
7 $(OUTPRE)ccapi_credentials.obj \
8 $(OUTPRE)ccapi_credentials_iterator.obj \
9 $(OUTPRE)ccapi_ipc.obj \
10 $(OUTPRE)ccapi_err.obj \
11 $(OUTPRE)ccapi_os_ipc.obj \
12 $(OUTPRE)ccapi_string.obj \
13 $(OUTPRE)ccapi_v2.obj \
14 $(OUTPRE)cci_array_internal.obj \
15 $(OUTPRE)cci_cred_union.obj \
16 $(OUTPRE)cci_debugging.obj \
17 $(OUTPRE)cci_identifier.obj \
18 $(OUTPRE)cci_message.obj \
19 $(OUTPRE)cci_os_debugging.obj \
20 $(OUTPRE)cci_os_identifier.obj \
21 $(OUTPRE)ccs_reply_proc.obj \
22 $(OUTPRE)ccs_reply_s.obj \
23 $(OUTPRE)ccs_request_c.obj \
24 $(OUTPRE)ccutils.obj \
26 $(OUTPRE)dllmain.obj \
31 $(OUTPRE)win-utils.obj
34 # Set NODEBUG if building release instead of debug
36 #BUILDTOP is krb5/src and is relative to krb5/src/ccapi/lib/win, for making Makefile.
38 CCAPI = $(BUILDTOP)\CCAPI
40 COWIN = $(CCAPI)\common\win
41 CCUTIL = $(CCAPI)\common\win\OldCC
43 LIBWIN = $(LIBDIR)\win
44 POSIX = $(BUILDTOP)\lib\krb5\posix
45 OLDCC = $(LIBWIN)\OldCC
46 SRCTMP = $(LIBWIN)\srctmp
48 !if defined(KRB5_KFW_COMPILE)
49 KFWINC= /I$(BUILDTOP)\..\..\krbcc\include
52 # Because all the sources are pulled together into the temp directory SRCTMP,
53 # the only includes we need are to directories outside of ccapi.
54 LOCALINCLUDES = /I..\$(BUILDTOP) /I..\$(BUILDTOP)\include /I..\$(BUILDTOP)\include\krb5 $(KFWINC) \
55 -I..\$(BUILDTOP)\util\et
56 MIDLINCLUDES = /I..\$(BUILDTOP)\include
58 CPPFLAGS = $(CPPFLAGS) /EHsc -D_CRTAPI1=_cdecl -D_CRTAPI2=_cdecl -DWINVER=0x0501 \
59 -D_WIN32_WINNT=0x0501 -D_CRT_SECURE_NO_WARNINGS $(cvarsdll)
64 LIBS = ..\$(CLIB) ..\$(SLIB) kernel32.lib ws2_32.lib user32.lib advapi32.lib
65 LFLAGS = /nologo $(LOPTS)
67 all: Makefile copysrc midl $(OUTPRE)$(CCLIB).dll finish
69 ccs_request.h ccs_request_c.c ccs_request_s.c : ccs_request.idl ccs_request.acf
70 midl $(MIDL_OPTIMIZATION) $(MIDLI) -oldnames -cpp_cmd $(CC) -cpp_opt "-E" \
73 ccs_reply.h ccs_reply_c.c ccs_reply_s.c : ccs_reply.idl ccs_reply.acf
74 midl $(MIDL_OPTIMIZATION) $(MIDLI) -oldnames -cpp_cmd $(CC) -cpp_opt "-E" \
78 echo "Copying all sources needed to build $(CCLIB).dll to $(SRCTMP)"
79 if NOT exist $(SRCTMP)\nul mkdir $(SRCTMP)
80 xcopy /D/Y $(CO)\*.* $(SRCTMP)
81 xcopy /D/Y $(COWIN)\*.* $(SRCTMP)
82 xcopy /D/Y $(CCUTIL)\*.* $(SRCTMP)
83 xcopy /D/Y $(LIBDIR)\*.* $(SRCTMP)
84 xcopy /D/Y $(LIBWIN)\*.* $(SRCTMP)
85 xcopy /D/Y $(OLDCC)\*.* $(SRCTMP)
87 if NOT exist $(OUTPRE)\nul mkdir $(OUTPRE)
89 midl : ccs_request.h ccs_reply.h
91 VERSIONRC = $(BUILDTOP)\..\windows\version.rc
92 CCLIBRES = $(OUTPRE)$(CCLIB).res
94 $(CCLIBRES): $(VERSIONRC)
95 $(RC) $(RCFLAGS) -DCCAPI_LIB -fo $@ -r $**
97 $(OUTPRE)$(CCLIB).dll: $(OBJS) $(CCLIB).def $(CCLIBRES)
98 $(LINK) $(LFLAGS) -entry:$(ENTRYPOINT) -dll /map:$*.map /out:$@ /DEF:$(CCLIB).def $(OBJS) \
99 /implib:$(CCLIB).lib $(dllflags) $(LIBS) $(KFWLIB) $(CCLIBRES) rpcrt4.lib $(conlibsdll) $(conflags)
102 echo ;$(CCLIB).def is generated by a Makefile rule. > $(CCLIB).def
103 echo HEAPSIZE 8192 >> $(CCLIB).def
104 echo EXPORTS >> $(CCLIB).def
105 type ccapi.exports >> $(CCLIB).def
106 type ccapi_v2.exports >> $(CCLIB).def
107 type debug.exports >> $(CCLIB).def
110 echo "Finished in ccapi/lib/win."
114 echo "Doing nothing for make install"
117 if exist $(OUTPRE)*.exe del $(OUTPRE)*.exe
118 if exist $(OUTPRE)*.obj del $(OUTPRE)*.obj
119 if exist $(OUTPRE)*.res del $(OUTPRE)*.res
120 if exist $(OUTPRE)*.map del $(OUTPRE)*.map
121 if exist $(OUTPRE)*.pdb del $(OUTPRE)*.pdb
122 if exist *.err del *.err
123 if exist $(SRCTMP) rmdir /s /q $(SRCTMP)