1*7f2fe78bSCy Schubertmydir=lib 2*7f2fe78bSCy SchubertSUBDIRS=crypto krb5 gssapi rpc kdb kadm5 apputils krad 3*7f2fe78bSCy SchubertWINSUBDIRS=crypto krb5 gssapi 4*7f2fe78bSCy SchubertBUILDTOP=$(REL).. 5*7f2fe78bSCy Schubert 6*7f2fe78bSCy Schubertall-unix: 7*7f2fe78bSCy Schubert 8*7f2fe78bSCy SchubertCLEANLIBS = libkrb5.a libkdb5.a libcrypto.a libgssapi_krb5.a libkadm.a \ 9*7f2fe78bSCy Schubert libcom_err.a libpty.a ibss.a libgssapi.a libapputils.a libkrb5.so \ 10*7f2fe78bSCy Schubert libcrypto.so 11*7f2fe78bSCy Schubert 12*7f2fe78bSCy Schubertclean-unix:: 13*7f2fe78bSCy Schubert 14*7f2fe78bSCy Schubertclean-windows:: 15*7f2fe78bSCy Schubert 16*7f2fe78bSCy Schubert# Windows stuff to make krb5 and gssapi DLLs. 17*7f2fe78bSCy Schubert 18*7f2fe78bSCy Schubert##MIT##!if !defined(VS_INC) 19*7f2fe78bSCy Schubert##MIT##!message Must define VS_INC to point to version server include dir! 20*7f2fe78bSCy Schubert##MIT##!error 21*7f2fe78bSCy Schubert##MIT##!endif 22*7f2fe78bSCy Schubert##MIT##!if !defined(VS_LIB) 23*7f2fe78bSCy Schubert##MIT##!message Must define VS_LIB to point to version server library! 24*7f2fe78bSCy Schubert##MIT##!error 25*7f2fe78bSCy Schubert##MIT##!endif 26*7f2fe78bSCy Schubert##MIT##MITLIBS=$(VS_LIB) 27*7f2fe78bSCy Schubert##MIT##MITFLAGS=-I$(VS_INC) /DVERSERV=1 28*7f2fe78bSCy Schubert 29*7f2fe78bSCy Schubert 30*7f2fe78bSCy Schubert 31*7f2fe78bSCy Schubert##WIN32##SLIBS = $(BUILDTOP)\util\support\$(OUTPRE)k5sprt$(BITS).lib 32*7f2fe78bSCy Schubert##WIN32##CLIBS = $(BUILDTOP)\util\et\$(OUTPRE)comerr.lib 33*7f2fe78bSCy Schubert##WIN32##PLIBS = $(BUILDTOP)\util\profile\$(OUTPRE)profile.lib 34*7f2fe78bSCy Schubert##WIN32##KLIBS = krb5\$(OUTPRE)krb5.lib crypto\$(OUTPRE)crypto.lib \ 35*7f2fe78bSCy Schubert##WIN32## $(BUILDTOP)\util\profile\$(OUTPRE)profile.lib 36*7f2fe78bSCy Schubert##WIN32##GLIBS = gssapi\$(OUTPRE)gssapi.lib 37*7f2fe78bSCy Schubert 38*7f2fe78bSCy Schubert 39*7f2fe78bSCy Schubert##WIN32##SDEF = k5sprt32.def 40*7f2fe78bSCy Schubert##WIN32##CDEF = comerr32.def 41*7f2fe78bSCy Schubert##WIN32##PDEF = xpprof32.def 42*7f2fe78bSCy Schubert##WIN32##KDEF = krb5_32.def 43*7f2fe78bSCy Schubert##WIN32##GDEF = gssapi32.def 44*7f2fe78bSCy Schubert 45*7f2fe78bSCy Schubert 46*7f2fe78bSCy Schubert 47*7f2fe78bSCy Schubert##WIN32##KRB5RC = krb5.rc 48*7f2fe78bSCy Schubert##WIN32##VERSIONRC = $(BUILDTOP)\windows\version.rc 49*7f2fe78bSCy Schubert 50*7f2fe78bSCy Schubert##WIN32##!if defined(VISUALSTUDIOVERSION) 51*7f2fe78bSCy Schubert##WIN32##!if $(VISUALSTUDIOVERSION:.=) >= 140 52*7f2fe78bSCy Schubert##WIN32##!ifdef NODEBUG 53*7f2fe78bSCy Schubert##WIN32##WINCRTEXTRA = ucrt.lib vcruntime.lib 54*7f2fe78bSCy Schubert##WIN32##!else 55*7f2fe78bSCy Schubert##WIN32##WINCRTEXTRA = ucrtd.lib vcruntimed.lib 56*7f2fe78bSCy Schubert##WIN32##!endif 57*7f2fe78bSCy Schubert##WIN32##!endif 58*7f2fe78bSCy Schubert##WIN32##!endif 59*7f2fe78bSCy Schubert##WIN32##WINLIBS = kernel32.lib ws2_32.lib user32.lib shell32.lib oldnames.lib \ 60*7f2fe78bSCy Schubert##WIN32## version.lib secur32.lib advapi32.lib gdi32.lib delayimp.lib \ 61*7f2fe78bSCy Schubert##WIN32## $(WINCRTEXTRA) 62*7f2fe78bSCy Schubert##WIN32##WINDLLFLAGS = $(DLL_LINKOPTS) -base:0x1c000000 /DELAYLOAD:secur32.dll \ 63*7f2fe78bSCy Schubert##WIN32## /DELAYLOAD:advapi32.dll /DELAY:UNLOAD /DELAY:NOBIND 64*7f2fe78bSCy Schubert 65*7f2fe78bSCy Schubert##WIN32##S_GLUE=$(OUTPRE)support_glue.obj 66*7f2fe78bSCy Schubert##WIN32##K5_GLUE=$(OUTPRE)k5_glue.obj 67*7f2fe78bSCy Schubert##WIN32##GSS_GLUE=$(OUTPRE)gss_glue.obj 68*7f2fe78bSCy Schubert##WIN32##COMERR_GLUE=$(OUTPRE)comerr_glue.obj 69*7f2fe78bSCy Schubert##WIN32##PROF_GLUE=$(OUTPRE)prof_glue.obj 70*7f2fe78bSCy Schubert 71*7f2fe78bSCy Schubert##WIN32##SGLUE=$(S_GLUE) 72*7f2fe78bSCy Schubert##WIN32##CGLUE=$(COMERR_GLUE) 73*7f2fe78bSCy Schubert##WIN32##PGLUE=$(PROF_GLUE) 74*7f2fe78bSCy Schubert##WIN32##KGLUE=$(K5_GLUE) 75*7f2fe78bSCy Schubert##WIN32##GGLUE=$(GSS_GLUE) 76*7f2fe78bSCy Schubert 77*7f2fe78bSCy Schubert##WIN32##RCFLAGS=$(CPPFLAGS) -I$(top_srcdir) -D_WIN32 -DRES_ONLY 78*7f2fe78bSCy Schubert 79*7f2fe78bSCy Schubert##WIN32##SRES=$(SLIB:.lib=.res) 80*7f2fe78bSCy Schubert##WIN32##CRES=$(CLIB:.lib=.res) 81*7f2fe78bSCy Schubert##WIN32##PRES=$(PLIB:.lib=.res) 82*7f2fe78bSCy Schubert##WIN32##KRES=$(KLIB:.lib=.res) 83*7f2fe78bSCy Schubert##WIN32##GRES=$(GLIB:.lib=.res) 84*7f2fe78bSCy Schubert 85*7f2fe78bSCy Schubert##WIN32##$(SRES): $(VERSIONRC) 86*7f2fe78bSCy Schubert##WIN32## $(RC) $(RCFLAGS) -DSUPPORT_LIB -fo $@ -r $** 87*7f2fe78bSCy Schubert##WIN32##$(CRES): $(VERSIONRC) 88*7f2fe78bSCy Schubert##WIN32## $(RC) $(RCFLAGS) -DCE_LIB -fo $@ -r $** 89*7f2fe78bSCy Schubert##WIN32##$(PRES): $(VERSIONRC) 90*7f2fe78bSCy Schubert##WIN32## $(RC) $(RCFLAGS) -DPROF_LIB -fo $@ -r $** 91*7f2fe78bSCy Schubert##WIN32##$(KRES): $(KRB5RC) 92*7f2fe78bSCy Schubert##WIN32## $(RC) $(RCFLAGS) -DKRB5_LIB -fo $@ -r $** 93*7f2fe78bSCy Schubert##WIN32##$(GRES): $(VERSIONRC) 94*7f2fe78bSCy Schubert##WIN32## $(RC) $(RCFLAGS) -DGSSAPI_LIB -fo $@ -r $** 95*7f2fe78bSCy Schubert##WIN32##$(KRB5RC): $(VERSIONRC) 96*7f2fe78bSCy Schubert 97*7f2fe78bSCy Schubert##WIN32##$(SLIB): $(SDEF) $(SLIBS) $(SGLUE) $(SRES) 98*7f2fe78bSCy Schubert##WIN32## link $(WINDLLFLAGS) -def:$(SDEF) -out:$*.dll \ 99*7f2fe78bSCy Schubert##WIN32## $(SLIBS) $(SGLUE) $(SRES) $(WINLIBS) 100*7f2fe78bSCy Schubert##WIN32## $(_VC_MANIFEST_EMBED_DLL) 101*7f2fe78bSCy Schubert##WIN32##$(SDEF): ..\util\support\libkrb5support.exports 102*7f2fe78bSCy Schubert##WIN32## echo EXPORTS > $(SDEF).new 103*7f2fe78bSCy Schubert##WIN32## type ..\util\support\libkrb5support.exports >> $(SDEF).new 104*7f2fe78bSCy Schubert##WIN32## -$(RM) $(SDEF) 105*7f2fe78bSCy Schubert##WIN32## ren $(SDEF).new $(SDEF) 106*7f2fe78bSCy Schubert 107*7f2fe78bSCy Schubert##WIN32##$(CLIB): $(CDEF) $(CLIBS) $(CGLUE) $(CRES) $(SLIB) 108*7f2fe78bSCy Schubert##WIN32## link $(WINDLLFLAGS) -def:$(CDEF) -out:$*.dll \ 109*7f2fe78bSCy Schubert##WIN32## $(CLIBS) $(CGLUE) $(CRES) $(SLIB) $(WINLIBS) 110*7f2fe78bSCy Schubert##WIN32## $(_VC_MANIFEST_EMBED_DLL) 111*7f2fe78bSCy Schubert 112*7f2fe78bSCy Schubert##WIN32##$(PLIB): $(PDEF) $(PLIBS) $(PGLUE) $(PRES) $(CLIB) $(SLIB) 113*7f2fe78bSCy Schubert##WIN32## link $(WINDLLFLAGS) -def:$(PDEF) -out:$*.dll \ 114*7f2fe78bSCy Schubert##WIN32## $(PLIBS) $(PGLUE) $(PRES) $(CLIB) $(SLIB) $(WINLIBS) 115*7f2fe78bSCy Schubert##WIN32## $(_VC_MANIFEST_EMBED_DLL) 116*7f2fe78bSCy Schubert 117*7f2fe78bSCy Schubert##WIN32##$(KLIB): $(KDEF) $(KLIBS) $(KGLUE) $(KRES) $(CLIB) $(SLIB) $(MITLIBS) 118*7f2fe78bSCy Schubert##WIN32## link $(WINDLLFLAGS) -def:$(KDEF) -out:$*.dll \ 119*7f2fe78bSCy Schubert##WIN32## $(KLIBS) $(KGLUE) $(KRES) $(CLIB) $(SLIB) $(MITLIBS) $(DNSLIBS) $(WINLIBS) 120*7f2fe78bSCy Schubert##WIN32## $(_VC_MANIFEST_EMBED_DLL) 121*7f2fe78bSCy Schubert 122*7f2fe78bSCy Schubert##WIN32##$(GLIB): $(GDEF) $(GLIBS) $(GGLUE) $(GRES) $(KLIB) $(CLIB) $(SLIB) 123*7f2fe78bSCy Schubert##WIN32## link $(WINDLLFLAGS) -def:$(GDEF) -out:$*.dll \ 124*7f2fe78bSCy Schubert##WIN32## $(GLIBS) $(GGLUE) $(GRES) $(KLIB) $(CLIB) $(SLIB) $(WINLIBS) 125*7f2fe78bSCy Schubert##WIN32## $(_VC_MANIFEST_EMBED_DLL) 126*7f2fe78bSCy Schubert 127*7f2fe78bSCy Schubert##WIN32##$(K5_GLUE): win_glue.c 128*7f2fe78bSCy Schubert##WIN32## $(CC) $(ALL_CFLAGS) $(MITFLAGS) /c /DKRB5=1 /Fo$@ $** 129*7f2fe78bSCy Schubert##WIN32##$(GSS_GLUE): win_glue.c 130*7f2fe78bSCy Schubert##WIN32## $(CC) $(ALL_CFLAGS) /c /DGSSAPI=1 /Fo$@ $** 131*7f2fe78bSCy Schubert##WIN32##$(COMERR_GLUE): win_glue.c 132*7f2fe78bSCy Schubert##WIN32## $(CC) $(ALL_CFLAGS) /c /DCOMERR=1 /Fo$@ $** 133*7f2fe78bSCy Schubert##WIN32##$(PROF_GLUE): win_glue.c 134*7f2fe78bSCy Schubert##WIN32## $(CC) $(ALL_CFLAGS) /c /DPROFILELIB=1 /Fo$@ $** 135*7f2fe78bSCy Schubert##WIN32##$(S_GLUE): win_glue.c 136*7f2fe78bSCy Schubert##WIN32## $(CC) $(ALL_CFLAGS) /c /DSUPPORTLIB=1 /Fo$@ $** 137*7f2fe78bSCy Schubert 138*7f2fe78bSCy Schubert##WIN32### Build Convenience 139*7f2fe78bSCy Schubert##WIN32##comerr.lib: $(CLIB) 140*7f2fe78bSCy Schubert##WIN32##krb5.lib: $(KLIB) 141*7f2fe78bSCy Schubert##WIN32##gssapi.lib: $(GLIB) 142*7f2fe78bSCy Schubert##WIN32##profile.lib: $(PLIB) 143*7f2fe78bSCy Schubert 144*7f2fe78bSCy Schubert##WIN32##all-windows: all-recurse lib-windows 145*7f2fe78bSCy Schubert##WIN32##lib-windows: krb5.lib gssapi.lib profile.lib 146