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