1 # Copyright 2000, International Business Machines Corporation and others.
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
9 include @TOP_OBJDIR@/src/config/Makefile.config
12 # OS specific object files:
28 # System specific build commands and flags
29 DEFINES= -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT
32 #LORDER = /usr/ccs/bin/lorder
33 #CC = /opt/SUNWspro/bin/cc
34 KDEFS= -Dsun4c -DSUN4C_60 -DNFSCLIENT -DSYSACCT -DOLDSCSI -DVDDRV -D_KERNEL \
35 -DSYSV -dn ${ARCH_DEFS}
37 <sun4x_57 sun4x_58 sun4x_59>
42 CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG}
44 # Name of directory to hold object files and libraries.
45 <all -sun4x_57 -sun4x_58 -sun4x_59>
47 <sun4x_57 sun4x_58 sun4x_59>
48 KOBJ = MODLOAD32 MODLOAD64
51 # This tells Makefile.common to use it's single directory build target.
52 <all -sun4x_57 -sun4x_58 -sun4x_59>
53 COMPDIRS = single_compdir
54 INSTDIRS = single_instdir
55 DESTDIRS = single_destdir
57 <sun4x_57 sun4x_58 sun4x_59>
58 COMPDIRS = solaris_compdirs
59 INSTDIRS = solaris_instdirs
60 DESTDIRS = solaris_destdirs
63 include Makefile.common
67 -$(RM) -f h net netinet rpc ufs nfs machine sys inet
68 -ln -fs /usr/include/sys h
69 -ln -fs /usr/include/net net
70 -ln -fs /usr/include/netinet netinet
71 -ln -fs /usr/include/rpc rpc
72 -ln -fs /usr/include/sys sys
73 -ln -fs /usr/include/nfs nfs
74 -ln -fs /usr/include/inet inet
75 -ln -fs /usr/include/ufs ufs
76 for t in ${KOBJ} ; do \
77 echo Making directory: $$t; \
79 $(RM) -f $$t/Makefile.common $$t/Makefile $$t/config ; \
80 ln -fs ../Makefile.common $$t/Makefile.common ; \
81 ln -fs ../Makefile $$t/Makefile ;\
82 ln -fs ../config $$t/config ;\
86 ## This is the target for a Solaris 7. Here we build both the 32 bit and
87 ## the 64 bit libafs in MODLOAD32 and MODLOAD64 directories respectively
89 <sun4x_57 sun4x_58 sun4x_59>
90 ${COMPDIRS} ${INSTDIRS} ${DESTDIRS}:
91 for t in ${KOBJ} ; do \
92 echo Building directory: $$t ; \
95 ARCH_DEFS="${KDEFS_32}" ; \
98 ARCH_DEFS="${KDEFS_64}" ; \
104 $(MAKE) $@_libafs ; \
108 solaris_compdirs_libafs: libafs
109 solaris_instdirs_libafs: install_libafs
110 solaris_destdirs_libafs: dest_libafs
114 # Below this line are targets when in the COMMON directory:
116 LIBAFSNONFS = libafs.nonfs.o
118 <all -sun4x_57 -sun4x_58 -sun4x_59>
119 INST_LIBAFS = ${DESTDIR}${afskerneldir}/${LIBAFS}
120 INST_LIBAFSNONFS = ${DESTDIR}${afskerneldir}/${LIBAFSNONFS}
122 DEST_LIBAFS = ${DEST}/root.client/usr/vice/etc/modload/${LIBAFS}
123 DEST_LIBAFSNONFS = ${DEST}/root.client/usr/vice/etc/modload/${LIBAFSNONFS}
125 # Without this line, gmake tries to build libafs.o
128 libafs: $(LIBAFSNONFS)
129 install_libafs: $(INST_LIBAFSNONFS)
130 dest_libafs: $(DEST_LIBAFSNONFS)
133 $(INST_LIBAFS): $(LIBAFS)
136 $(INST_LIBAFSNONFS): $(LIBAFSNONFS)
139 $(DEST_LIBAFS): $(LIBAFS)
142 $(DEST_LIBAFSNONFS): $(LIBAFSNONFS)
146 ${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS)
148 $(LD) -r -o $@ $(AFSAOBJS) ${AFSNFSOBJS}
150 ${LIBAFSNONFS}: $(AFSAOBJS) $(AFSNONFSOBJS)
152 $(LD) -r -o $@ $(AFSAOBJS) ${AFSNONFSOBJS}
154 <sun4x_57 sun4x_58 sun4x_59>
156 libafs: ${LIBAFSNONFS}
158 install_libafs: ${LIBAFSNONFS}
159 ${INSTALL} -f ${LIBAFSNONFS} ${DESTDIR}${afskerneldir}/libafs${BITS}.nonfs.o
161 dest_libafs: ${LIBAFSNONFS}
162 ${INSTALL} -f ${LIBAFSNONFS} ${DEST}/root.client/usr/vice/etc/modload/libafs${BITS}.nonfs.o
166 # Solaris specific objects
167 osi_groups.o: $(AFS)/osi_groups.c
169 osi_inode.o: $(AFS)/osi_inode.c
171 osi_file.o: $(AFS)/osi_file.c
173 osi_sleep.o: $(AFS)/osi_sleep.c
175 osi_vfsops_nfs.o: $(AFS)/osi_vfsops.c
176 $(CRULE1) -o osi_vfsops_nfs.o
177 osi_vfsops.o: $(AFS)/osi_vfsops.c
178 $(CRULE1) -DAFS_NONFSTRANS
179 osi_vm.o: $(AFS)/osi_vm.c
181 osi_vnodeops.o: $(AFS)/osi_vnodeops.c
183 xdr_int64.o: $(RX)/xdr_int64.c