makefiles-attempt-to-support-gmake-j-20011023
[openafs.git] / src / libafs / MakefileProto.DARWIN.in
index 51ca916..e2bc64e 100644 (file)
@@ -3,10 +3,27 @@
 # 
 # MakefileProto for Digital Unix systems
 #
-DESTDIR=@DESTDIR@
-SRCDIR=@SRCDIR@
+DEST=@DEST@
+TOP_INCDIR=@TOP_INCDIR@
+TOP_LIBDIR=@TOP_LIBDIR@
 TOP_SRCDIR=@TOP_SRCDIR@
+TOP_OBJDIR=@TOP_OBJDIR@
+srcdir=@srcdir@
+VPATH=${srcdir}
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+bindir=@bindir@
+sbindir=@sbindir@
+libexecdir=@libexecdir@
+libdir=@libdir@
+includedir=@includedir@
+mandir=@mandir@
+afssrvbindir=@afssrvbindir@
+afssrvsbindir=@afssrvsbindir@
+afssrvlibexecdir=@afssrvlibexecdir@
+afskerneldir=@afskerneldir@
 SYS_NAME=@AFS_SYSNAME@
+DARWIN_INFOFILE=../@DARWIN_INFOFILE@
 
 include config/Makefile.${SYS_NAME}
 
@@ -33,14 +50,12 @@ AFS_OS_NONFSOBJS = osi_vfsops.o
 
 # System specific build commands and flags
 KDEFS=
-DBUG = -g
+DBUG = 
 DEFINES= -D_KERNEL -DKERNEL -DKERNEL_PRIVATE -DDIAGNOSTIC -DUSE_SELECT -DMACH_USER_API -DMACH_KERNEL
-OPTF=${OPT} 
-OPTF2=${OPT2} 
-KOPTS=-traditional-cpp -static -fno-common -finline -fno-keep-inline-functions -force_cpusubtype_ALL -msoft-float -mlong-branch 
+KOPTS=-no-precomp -static -fno-common -finline -fno-keep-inline-functions -force_cpusubtype_ALL -msoft-float -mlong-branch 
 #CFLAGS=-Werror-implicit-function-declaration -I. -I.. ${KINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG}
 #CFLAGS=-framework Kernel -I. -I.. ${KINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG}
-CFLAGS=-I. -I.. -I${TOP_SRCDIR}/config ${KINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG}
+CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config ${KINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG} ${OPTMZ}
 
 
 # Name of directory to hold object files and libraries.
@@ -49,43 +64,52 @@ KOBJ = MODLOAD
 # This tells Makefile.common to use it's single directory build target.
 COMPDIRS = single_compdir
 INSTDIRS = single_instdir
+DESTDIRS = single_destdir
 
 include Makefile.common
 
 setup:
        -mkdir $(KOBJ)
        -$(RM) $(KOBJ)/Makefile $(KOBJ)/Makefile.common $(KOBJ)/config
-       ln -s ../Makefile $(KOBJ)/Makefile
-       ln -s ../Makefile.common $(KOBJ)/Makefile.common
-       ln -s ../config $(KOBJ)/config
+       ln -fs ../Makefile $(KOBJ)/Makefile
+       ln -fs ../Makefile.common $(KOBJ)/Makefile.common
+       ln -fs ../config $(KOBJ)/config
        -$(RM) -f  h net netinet rpc ufs nfs  machine sys vm mach kern
-       -ln -s $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/net net
-       -ln -s $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/machine machine
-       -ln -s $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/netinet netinet
-       -ln -s $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/nfs nfs
-       -ln -s /usr/include/rpc rpc
-       -ln -s $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/sys sys
-       -ln -s $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/ufs ufs
-       -ln -s $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/sys h
+       -ln -fs $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/net net
+       -ln -fs $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/machine machine
+       -ln -fs $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/netinet netinet
+       -ln -fs $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/nfs nfs
+       -ln -fs /usr/include/rpc rpc
+       -ln -fs $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/sys sys
+       -ln -fs $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/ufs ufs
+       -ln -fs $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/sys h
 
 
 # Below this line are targets when in the COMMON directory:
 LIBAFS = libafs.o
 LIBAFSNONFS = libafs.nonfs.o
 
-DEST_LIBAFS = ${DESTDIR}/root.client/usr/vice/etc/afs.kext/Contents/MacOS/afs-nfs
-DEST_LIBAFSNONFS = ${DESTDIR}/root.client/usr/vice/etc/afs.kext/Contents/MacOS/afs
+INST_LIBAFS = ${DESTDIR}${afskerneldir}/afs-nfs.kext
+INST_LIBAFSNONFS = ${DESTDIR}${afskerneldir}/afs.kext
+DEST_LIBAFS = ${DEST}/root.client/usr/vice/etc/afs-nfs.kext
+DEST_LIBAFSNONFS = ${DEST}/root.client/usr/vice/etc/afs.kext
 
 
 libafs: $(LIBAFSNONFS) ;
-install_libafs: $(DEST_LIBAFSNONFS) ;
+install_libafs: $(LIBAFSNONFS) ;
+       -mkdir -p ${INST_LIBAFSNONFS}
+       -mkdir -p ${INST_LIBAFSNONFS}/Contents
+       $(INSTALL) -f ${DARWIN_INFOFILE} ${INST_LIBAFSNONFS}/Contents/Info.plist
+       -mkdir -p ${INST_LIBAFSNONFS}/Contents/MacOS
+       $(INSTALL) -f ${LIBAFSNONFS} ${INST_LIBAFSNONFS}/Contents/MacOS/afs
 
+dest_libafs: $(LIBAFSNONFS) ;
+       -mkdir -p ${DEST_LIBAFSNONFS}
+       -mkdir -p ${DEST_LIBAFSNONFS}/Contents
+       $(INSTALL) -f ${DARWIN_INFOFILE} ${DEST_LIBAFSNONFS}/Contents/Info.plist
+       -mkdir -p ${DEST_LIBAFSNONFS}/Contents/MacOS
+       $(INSTALL) -f ${LIBAFSNONFS} ${DEST_LIBAFSNONFS}/Contents/MacOS/afs
 
-$(DEST_LIBAFS): $(LIBAFS)
-       $(INSTALL) -f $? $@
-
-$(DEST_LIBAFSNONFS): $(LIBAFSNONFS)
-       $(INSTALL) -f $? $@
 
 ${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS)
        $(LD) -r -o ${LIBAFS} ${AFSAOBJS} ${AFSNFSOBJS}
@@ -116,8 +140,8 @@ osi_vnodeops.o: $(AFS)/osi_vnodeops.c
 osi_module.o: $(AFS)/osi_module.c
        $(CRULE1)
 xdr.o: $(RX)/xdr.c
-       $(CRULE1);
+       $(CRULE1)
 xdr_array.o: $(RX)/xdr_array.c
-       $(CRULE1);
+       $(CRULE1)
 xdr_int64.o: $(RX)/xdr_int64.c
-       $(CRULE1);
+       $(CRULE1)