macos-largefile-client-20040808
[openafs.git] / src / libafs / MakefileProto.DARWIN.in
1 # Copyright 2000, International Business Machines Corporation and others.
2 # All Rights Reserved.
3 #
4 # This software has been released under the terms of the IBM Public
5 # License.  For details, see the LICENSE file in the top-level source
6 # directory or online at http://www.openafs.org/dl/license10.html
7 # $Header$
8
9 # MakefileProto for Digital Unix systems
10 #
11 srcdir=@srcdir@
12 include @TOP_OBJDIR@/src/config/Makefile.config
13
14
15 # OS specific object files:
16 AFS_OS_OBJS = \
17         osi_misc.o \
18         osi_file.o \
19         osi_inode.o \
20         osi_groups.o \
21         osi_sleep.o \
22         osi_vm.o \
23         osi_vnodeops.o \
24         osi_module.o
25
26
27 #AFS_OS_NFSOBJS = osi_vfsops_nfs.o
28
29 AFS_OS_NONFSOBJS = osi_vfsops.o
30
31
32 # System specific build commands and flags
33 KDEFS=
34 DBUG = 
35 DEFINES= -D_KERNEL -DKERNEL -DKERNEL_PRIVATE -DDIAGNOSTIC -DUSE_SELECT -DMACH_USER_API -DMACH_KERNEL
36 <ppc_darwin_70>
37 KOPTS=-static -fno-common -finline -fno-keep-inline-functions -force_cpusubtype_ALL -msoft-float -mlong-branch 
38 <ppc_darwin_60>
39 KOPTS=-no-cpp-precomp -static -fno-common -finline -fno-keep-inline-functions -force_cpusubtype_ALL -msoft-float -mlong-branch 
40 <ppc_darwin_14 ppc_darwin_13 ppc_darwin_12>
41 KOPTS=-no-precomp -static -fno-common -finline -fno-keep-inline-functions -force_cpusubtype_ALL -msoft-float -mlong-branch 
42 <all>
43 CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config ${KINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG} ${OPTMZ}
44 KINCLUDES=-I${KROOT}/System/Library/Frameworks/Kernel.Framework/Headers
45
46
47 # Name of directory to hold object files and libraries.
48 KOBJ = MODLOAD
49
50 # This tells Makefile.common to use it's single directory build target.
51 COMPDIRS = single_compdir
52 INSTDIRS = single_instdir
53 DESTDIRS = single_destdir
54
55 include Makefile.common
56
57 setup:
58         -mkdir $(KOBJ)
59         -$(RM) $(KOBJ)/Makefile $(KOBJ)/Makefile.common $(KOBJ)/config
60         ln -fs ../Makefile $(KOBJ)/Makefile
61         ln -fs ../Makefile.common $(KOBJ)/Makefile.common
62         ln -fs ../config $(KOBJ)/config
63         -$(RM) -f  h net netinet rpc ufs nfs  machine sys vm mach kern
64         -ln -fs $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/net net
65         -ln -fs $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/machine machine
66         -ln -fs $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/netinet netinet
67         -ln -fs $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/nfs nfs
68         -ln -fs /usr/include/rpc rpc
69         -ln -fs $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/sys sys
70         -ln -fs $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/ufs ufs
71         -ln -fs $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/sys h
72
73
74 # Below this line are targets when in the COMMON directory:
75 LIBAFS = libafs.o
76 LIBAFSNONFS = libafs.nonfs.o
77
78 INST_LIBAFS = ${DESTDIR}${afskerneldir}/afs-nfs.kext
79 INST_LIBAFSNONFS = ${DESTDIR}${afskerneldir}/afs.kext
80 DEST_LIBAFS = ${DEST}/root.client/usr/vice/etc/afs-nfs.kext
81 DEST_LIBAFSNONFS = ${DEST}/root.client/usr/vice/etc/afs.kext
82
83
84 libafs: $(LIBAFSNONFS) ;
85 install_libafs: $(LIBAFSNONFS) ;
86         -mkdir -p ${INST_LIBAFSNONFS}
87         -mkdir -p ${INST_LIBAFSNONFS}/Contents
88         $(INSTALL) -f ../${DARWIN_INFOFILE} ${INST_LIBAFSNONFS}/Contents/Info.plist
89         -mkdir -p ${INST_LIBAFSNONFS}/Contents/MacOS
90         $(INSTALL) -f ${LIBAFSNONFS} ${INST_LIBAFSNONFS}/Contents/MacOS/afs
91
92 dest_libafs: $(LIBAFSNONFS) ;
93         -mkdir -p ${DEST_LIBAFSNONFS}
94         -mkdir -p ${DEST_LIBAFSNONFS}/Contents
95         $(INSTALL) -f ../${DARWIN_INFOFILE} ${DEST_LIBAFSNONFS}/Contents/Info.plist
96         -mkdir -p ${DEST_LIBAFSNONFS}/Contents/MacOS
97         $(INSTALL) -f ${LIBAFSNONFS} ${DEST_LIBAFSNONFS}/Contents/MacOS/afs
98
99
100 ${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS)
101         $(LD) -r -o ${LIBAFS} ${AFSAOBJS} ${AFSNFSOBJS} -lcc_kext
102
103 ${LIBAFSNONFS}:  $(AFSAOBJS) $(AFSNONFSOBJS)
104         $(LD) -r -o ${LIBAFSNONFS} ${AFSAOBJS} ${AFSNONFSOBJS} -lcc_kext