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 \
32 $(OUTPRE)win-utils.obj
35 # Set NODEBUG if building release instead of debug
37 #BUILDTOP is krb5/src and is relative to krb5/src/ccapi/lib/win, for making Makefile.
39 CCAPI = $(BUILDTOP)\CCAPI
41 COWIN = $(CCAPI)\common\win
42 CCUTIL = $(CCAPI)\common\win\OldCC
44 LIBWIN = $(LIBDIR)\win
45 POSIX = $(BUILDTOP)\lib\krb5\posix
46 OLDCC = $(LIBWIN)\OldCC
47 SRCTMP = $(LIBWIN)\srctmp
49 !if defined(KRB5_KFW_COMPILE)
50 KFWINC= /I$(BUILDTOP)\..\..\krbcc\include
53 # Because all the sources are pulled together into the temp directory SRCTMP,
54 # the only includes we need are to directories outside of ccapi.
55 LOCALINCLUDES = /I..\$(BUILDTOP) /I..\$(BUILDTOP)\include /I..\$(BUILDTOP)\include\krb5 $(KFWINC) \
56 -I..\$(BUILDTOP)\util\et
57 MIDLINCLUDES = /I..\$(BUILDTOP)\include
59 CPPFLAGS = $(CPPFLAGS) /EHsc -D_CRTAPI1=_cdecl -D_CRTAPI2=_cdecl -DWINVER=0x0501 \
60 -D_WIN32_WINNT=0x0501 -D_CRT_SECURE_NO_WARNINGS $(cvarsdll)
65 LIBS = ..\$(CLIB) ..\$(SLIB) kernel32.lib ws2_32.lib user32.lib advapi32.lib
66 LFLAGS = /nologo $(LOPTS)
68 all:: Makefile copysrc midl $(OUTPRE)ccapi.dll finish
70 ccs_request.h ccs_request_c.c ccs_request_s.c : ccs_request.idl ccs_request.acf
71 midl $(MIDL_OPTIMIZATION) $(MIDLI) -oldnames -cpp_cmd $(CC) -cpp_opt "-E" \
74 ccs_reply.h ccs_reply_c.c ccs_reply_s.c : ccs_reply.idl ccs_reply.acf
75 midl $(MIDL_OPTIMIZATION) $(MIDLI) -oldnames -cpp_cmd $(CC) -cpp_opt "-E" \
79 echo "Copying all sources needed to build ccapi.dll to $(SRCTMP)"
80 if NOT exist $(SRCTMP)\nul mkdir $(SRCTMP)
81 xcopy /D/Y $(CO)\*.* $(SRCTMP)
82 xcopy /D/Y $(COWIN)\*.* $(SRCTMP)
83 xcopy /D/Y $(CCUTIL)\*.* $(SRCTMP)
84 xcopy /D/Y $(LIBDIR)\*.* $(SRCTMP)
85 xcopy /D/Y $(LIBWIN)\*.* $(SRCTMP)
86 xcopy /D/Y $(OLDCC)\*.* $(SRCTMP)
88 if NOT exist $(OUTPRE)\nul mkdir $(OUTPRE)
90 midl : ccs_request.h ccs_reply.h
93 $(OUTPRE)ccapi.dll: $(OBJS) ccapi.def
94 $(LINK) $(LFLAGS) -entry:_DllMainCRTStartup@12 -dll /map:$*.map /out:$@ /DEF:ccapi.def $(OBJS) \
95 /implib:ccapi.lib $(dllflags) $(LIBS) $(KFWLIB) $(SCLIB) rpcrt4.lib $(conlibsdll) $(conflags)
98 echo ;ccapi.def is generated by a Makefile rule. > ccapi.def
99 echo HEAPSIZE 8192 >> ccapi.def
100 echo EXPORTS >> ccapi.def
101 type ccapi.exports >> ccapi.def
102 type ccapi_v2.exports >> ccapi.def
103 type debug.exports >> ccapi.def
106 echo "Finished in ccapi/lib/win."
110 echo "Doing nothing for make install"
113 if exist $(OUTPRE)*.exe del $(OUTPRE)*.exe
114 if exist $(OUTPRE)*.obj del $(OUTPRE)*.obj
115 if exist $(OUTPRE)*.res del $(OUTPRE)*.res
116 if exist $(OUTPRE)*.map del $(OUTPRE)*.map
117 if exist $(OUTPRE)*.pdb del $(OUTPRE)*.pdb
118 if exist *.err del *.err
119 if exist $(SRCTMP) rmdir /s /q $(SRCTMP)