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