9fb1ab3a3ebbf701ccfc66c5e0d4af051122ceca
[openafs.git] / src / libafs / MakefileProto.DARWIN.in
1 #/* Copyright (C) 1995, 1989 Transarc Corporation - All rights reserved */
2 # $Header$
3
4 # MakefileProto for Digital Unix systems
5 #
6 DESTDIR=@DESTDIR@
7 SRCDIR=@SRCDIR@
8 TOP_SRCDIR=@TOP_SRCDIR@
9 SYS_NAME=@AFS_SYSNAME@
10
11 include config/Makefile.${SYS_NAME}
12
13
14 # OS specific object files:
15 AFS_OS_OBJS = \
16         osi_misc.o \
17         osi_file.o \
18         osi_inode.o \
19         osi_groups.o \
20         osi_sleep.o \
21         osi_vm.o \
22         osi_vnodeops.o \
23         osi_module.o \
24         xdr.o \
25         xdr_array.o \
26         xdr_int64.o
27
28
29 #AFS_OS_NFSOBJS = osi_vfsops_nfs.o
30
31 AFS_OS_NONFSOBJS = osi_vfsops.o
32
33
34 # System specific build commands and flags
35 KDEFS=
36 DBUG = -g
37 DEFINES= -D_KERNEL -DKERNEL -DKERNEL_PRIVATE -DDIAGNOSTIC -DUSE_SELECT -DMACH_USER_API -DMACH_KERNEL
38 OPTF=${OPT} 
39 OPTF2=${OPT2} 
40 KOPTS=-traditional-cpp -static -fno-common -finline -fno-keep-inline-functions -force_cpusubtype_ALL -msoft-float -mlong-branch 
41 #CFLAGS=-Werror-implicit-function-declaration -I. -I.. ${KINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG}
42 #CFLAGS=-framework Kernel -I. -I.. ${KINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG}
43 CFLAGS=-I. -I.. -I${TOP_SRCDIR}/config ${KINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG}
44
45
46 # Name of directory to hold object files and libraries.
47 KOBJ = MODLOAD
48
49 # This tells Makefile.common to use it's single directory build target.
50 COMPDIRS = single_compdir
51 INSTDIRS = single_instdir
52
53 include Makefile.common
54
55 setup:
56         -mkdir $(KOBJ)
57         -rm $(KOBJ)/Makefile $(KOBJ)/Makefile.common $(KOBJ)/config
58         ln -s ../Makefile $(KOBJ)/Makefile
59         ln -s ../Makefile.common $(KOBJ)/Makefile.common
60         ln -s ../config $(KOBJ)/config
61         -rm -f  h net netinet rpc ufs nfs  machine sys vm mach kern
62         -ln -s $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/net net
63         -ln -s $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/machine machine
64         -ln -s $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/netinet netinet
65         -ln -s $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/nfs nfs
66         -ln -s /usr/include/rpc rpc
67         -ln -s $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/sys sys
68         -ln -s $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/ufs ufs
69         -ln -s $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/sys h
70
71
72 # Below this line are targets when in the COMMON directory:
73 LIBAFS = libafs.o
74 LIBAFSNONFS = libafs.nonfs.o
75
76 DEST_LIBAFS = ${DESTDIR}/root.client/usr/vice/etc/afs.kext/Contents/MacOS/afs-nfs
77 DEST_LIBAFSNONFS = ${DESTDIR}/root.client/usr/vice/etc/afs.kext/Contents/MacOS/afs
78
79
80 libafs: $(LIBAFSNONFS) ;
81 install_libafs: $(DEST_LIBAFSNONFS) ;
82
83
84 $(DEST_LIBAFS): $(LIBAFS)
85         $(INSTALL) -f $? $@
86
87 $(DEST_LIBAFSNONFS): $(LIBAFSNONFS)
88         $(INSTALL) -f $? $@
89
90 ${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS)
91         $(LD) -r -o ${LIBAFS} ${AFSAOBJS} ${AFSNFSOBJS}
92
93 ${LIBAFSNONFS}:  $(AFSAOBJS) $(AFSNONFSOBJS)
94         $(LD) -r -o ${LIBAFSNONFS} ${AFSAOBJS} ${AFSNONFSOBJS}
95
96
97 # Object build rules:
98 osi_groups.o: $(AFS)/osi_groups.c
99         $(CRULE1)
100 osi_file.o: $(AFS)/osi_file.c
101         $(CRULE1)
102 osi_inode.o: $(AFS)/osi_inode.c
103         $(CRULE1)
104 osi_misc.o: $(AFS)/osi_misc.c
105         $(CRULE1)
106 osi_sleep.o: $(AFS)/osi_sleep.c
107         $(CRULE1)
108 osi_vfsops_nfs.o: $(AFS)/osi_vfsops.c
109         $(CRULE1) -o osi_vfsops_nfs.o
110 osi_vfsops.o: $(AFS)/osi_vfsops.c
111         $(CRULE1) -DAFS_NONFSTRANS
112 osi_vm.o: $(AFS)/osi_vm.c
113         $(CRULE1)
114 osi_vnodeops.o: $(AFS)/osi_vnodeops.c
115         $(CRULE1)
116 osi_module.o: $(AFS)/osi_module.c
117         $(CRULE1)
118 xdr.o: $(RX)/xdr.c
119         $(CRULE1);
120 xdr_array.o: $(RX)/xdr_array.c
121         $(CRULE1);
122 xdr_int64.o: $(RX)/xdr_int64.c
123         $(CRULE1);