1# makefile: Constructs the Kerberos for Windows CCAPI server. 2 3#BUILDTOP is krb5/src and is relative to krb5/src/ccapi/server/win, for making Makefile. 4BUILDTOP=..\..\.. 5CCAPI = $(BUILDTOP)\CCAPI 6CO = $(CCAPI)\common 7COWIN = $(CCAPI)\common\win 8CCUTIL = $(CCAPI)\common\win\OldCC 9SRVDIR = $(CCAPI)\server 10SRVWIN = $(SRVDIR)\win 11POSIX = $(BUILDTOP)\lib\krb5\posix 12SRCTMP = $(SRVWIN)\srctmp 13 14!if defined(KRB5_KFW_COMPILE) 15KFWINC= /I$(BUILDTOP)\..\..\krbcc\include 16!endif 17 18OBJS = $(OUTPRE)cci_array_internal.$(OBJEXT) \ 19 $(OUTPRE)cci_cred_union.$(OBJEXT) \ 20 $(OUTPRE)cci_debugging.$(OBJEXT) \ 21 $(OUTPRE)cci_identifier.$(OBJEXT) \ 22 $(OUTPRE)cci_message.$(OBJEXT) \ 23 $(OUTPRE)cci_os_debugging.$(OBJEXT) \ 24 $(OUTPRE)cci_os_identifier.$(OBJEXT) \ 25 $(OUTPRE)ccs_array.$(OBJEXT) \ 26 $(OUTPRE)ccs_cache_collection.$(OBJEXT) \ 27 $(OUTPRE)ccs_callback.$(OBJEXT) \ 28 $(OUTPRE)ccs_ccache.$(OBJEXT) \ 29 $(OUTPRE)ccs_ccache_iterator.$(OBJEXT) \ 30 $(OUTPRE)ccs_client.$(OBJEXT) \ 31 $(OUTPRE)ccs_credentials.$(OBJEXT) \ 32 $(OUTPRE)ccs_credentials_iterator.$(OBJEXT) \ 33 $(OUTPRE)ccs_list.$(OBJEXT) \ 34 $(OUTPRE)ccs_list_internal.$(OBJEXT) \ 35 $(OUTPRE)ccs_lock.$(OBJEXT) \ 36 $(OUTPRE)ccs_lock_state.$(OBJEXT) \ 37 $(OUTPRE)ccs_os_pipe.$(OBJEXT) \ 38 $(OUTPRE)ccs_os_server.$(OBJEXT) \ 39 $(OUTPRE)ccs_pipe.$(OBJEXT) \ 40 $(OUTPRE)ccs_reply_c.$(OBJEXT) \ 41 $(OUTPRE)ccs_request_proc.$(OBJEXT) \ 42 $(OUTPRE)ccs_server.$(OBJEXT) \ 43 $(OUTPRE)ccs_win_pipe.$(OBJEXT) \ 44 $(OUTPRE)ccs_request_s.$(OBJEXT) \ 45 $(OUTPRE)ccutils.$(OBJEXT) \ 46 $(OUTPRE)init.$(OBJEXT) \ 47 $(OUTPRE)opts.$(OBJEXT) \ 48 $(OUTPRE)secure.$(OBJEXT) \ 49 $(OUTPRE)tls.$(OBJEXT) \ 50 $(OUTPRE)util.$(OBJEXT) \ 51 $(OUTPRE)win-utils.$(OBJEXT) \ 52 $(OUTPRE)WorkItem.$(OBJEXT) \ 53 $(OUTPRE)WorkQueue.$(OBJEXT) 54 55##### Options 56 57# Because all the sources are pulled together into the temp directory SRCTMP, 58# the only includes we need are to directories outside of ccapi. 59LOCALINCLUDES = /I..\$(BUILDTOP) /I..\$(BUILDTOP)\include /I..\$(BUILDTOP)\include\krb5 $(KFWINC) \ 60 -I..\$(BUILDTOP)\util\et /I. 61MIDLI = /I..\$(BUILDTOP)\include 62 63CPPFLAGS = $(CPPFLAGS) /EHsc -D_CRTAPI1=_cdecl -D_CRTAPI2=_cdecl -DWINVER=0x0501 \ 64-D_WIN32_WINNT=0x0501 -D_CRT_SECURE_NO_WARNINGS 65 66##### Linker 67LINK = link 68LIBS = ..\$(SLIB) rpcrt4.lib advapi32.lib ws2_32.lib user32.lib 69LFLAGS = /nologo $(LOPTS) 70 71 72all: Makefile copysrc midl $(OUTPRE)ccapiserver.exe finish 73 74ccs_request.h ccs_request_c.c ccs_request_s.c : ccs_request.idl ccs_request.acf 75 midl $(MIDL_OPTIMIZATION) $(MIDLI) -oldnames -cpp_cmd $(CC) -cpp_opt "-E" \ 76 ccs_request.idl 77 78ccs_reply.h ccs_reply_c.c ccs_reply_s.c : ccs_reply.idl ccs_reply.acf 79 midl $(MIDL_OPTIMIZATION) $(MIDLI) -oldnames -cpp_cmd $(CC) -cpp_opt "-E" \ 80 ccs_reply.idl 81 82copysrc : 83 echo "Copying all sources needed to build ccapiserver.exe to $(SRCTMP)" 84 if NOT exist $(SRCTMP)\nul mkdir $(SRCTMP) 85 xcopy /D/Y $(CO)\*.* $(SRCTMP) 86 xcopy /D/Y $(COWIN)\*.* $(SRCTMP) 87 xcopy /D/Y $(CCUTIL)\*.* $(SRCTMP) 88 xcopy /D/Y $(SRVDIR)\*.* $(SRCTMP) 89 xcopy /D/Y $(SRVWIN)\*.* $(SRCTMP) 90 cd $(SRCTMP) 91 if NOT exist $(OUTPRE)\nul mkdir $(OUTPRE) 92 93midl : ccs_request.h ccs_reply.h 94 95VERSIONRC = $(BUILDTOP)\..\windows\version.rc 96CCAPISERVERRES = $(OUTPRE)ccapiserver.res 97$(CCAPISERVERRES): $(VERSIONRC) 98 $(RC) $(RCFLAGS) -DCCAPISERVER_APP -fo $@ -r $** 99 100$(OUTPRE)ccapiserver.exe: $(OBJS) $(CCAPISERVERRES) 101 $(LINK) $(LFLAGS) /map:$*.map /out:$@ $(OBJS) $(LIBS) $(CCAPISERVERRES) $(conlibsdll) $(conflags) 102 103finish : 104 @echo "Finished building ccapiserver.exe" 105 cd 106 107clean: 108 if exist $(OUTPRE)*.exe del $(OUTPRE)*.exe 109 if exist $(OUTPRE)*.obj del $(OUTPRE)*.obj 110 if exist $(OUTPRE)*.res del $(OUTPRE)*.res 111 if exist $(OUTPRE)*.map del $(OUTPRE)*.map 112 if exist $(OUTPRE)*.pdb del $(OUTPRE)*.pdb 113 if exist *.err del *.err 114 if exist $(SRCTMP) rmdir /s /q $(SRCTMP) 115