xdr-int64-dont-build-on-dux-ever-20010829
[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
52 include Makefile.common
53
54 setup:
55         -mkdir $(KOBJ)
56         -rm $(KOBJ)/Makefile $(KOBJ)/Makefile.common
57         ln -s ../Makefile $(KOBJ)/Makefile
58         ln -s ../Makefile.common $(KOBJ)/Makefile.common
59         -rm -f  h net netinet rpc ufs nfs  machine sys vm mach kern
60         -ln -s $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/net net
61         -ln -s $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/machine machine
62         -ln -s $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/netinet netinet
63         -ln -s $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/nfs nfs
64         -ln -s /usr/include/rpc rpc
65         -ln -s $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/sys sys
66         -ln -s $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/ufs ufs
67         -ln -s $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/sys h
68
69
70 # Below this line are targets when in the COMMON directory:
71 LIBAFS = libafs.o
72 LIBAFSNONFS = libafs.nonfs.o
73
74 DEST_LIBAFS = ${DESTDIR}/root.client/usr/vice/etc/afs.kext/Contents/MacOS/afs-nfs
75 DEST_LIBAFSNONFS = ${DESTDIR}/root.client/usr/vice/etc/afs.kext/Contents/MacOS/afs
76
77
78 libafs: $(DEST_LIBAFSNONFS) ;
79
80
81 $(DEST_LIBAFS): $(LIBAFS)
82         $(INSTALL) -f $? $@
83
84 $(DEST_LIBAFSNONFS): $(LIBAFSNONFS)
85         $(INSTALL) -f $? $@
86
87 ${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS)
88         $(LD) -r -o ${LIBAFS} ${AFSAOBJS} ${AFSNFSOBJS}
89
90 ${LIBAFSNONFS}:  $(AFSAOBJS) $(AFSNONFSOBJS)
91         $(LD) -r -o ${LIBAFSNONFS} ${AFSAOBJS} ${AFSNONFSOBJS}
92
93
94 # Object build rules:
95 osi_groups.o: $(AFS)/osi_groups.c
96         $(CRULE1)
97 osi_file.o: $(AFS)/osi_file.c
98         $(CRULE1)
99 osi_inode.o: $(AFS)/osi_inode.c
100         $(CRULE1)
101 osi_misc.o: $(AFS)/osi_misc.c
102         $(CRULE1)
103 osi_sleep.o: $(AFS)/osi_sleep.c
104         $(CRULE1)
105 osi_vfsops_nfs.o: $(AFS)/osi_vfsops.c
106         $(CRULE1) -o osi_vfsops_nfs.o
107 osi_vfsops.o: $(AFS)/osi_vfsops.c
108         $(CRULE1) -DAFS_NONFSTRANS
109 osi_vm.o: $(AFS)/osi_vm.c
110         $(CRULE1)
111 osi_vnodeops.o: $(AFS)/osi_vnodeops.c
112         $(CRULE1)
113 osi_module.o: $(AFS)/osi_module.c
114         $(CRULE1)
115 xdr.o: $(RX)/xdr.c
116         $(CRULE1);
117 xdr_array.o: $(RX)/xdr_array.c
118         $(CRULE1);
119 xdr_int64.o: $(RX)/xdr_int64.c
120         $(CRULE1);