srcdir=@srcdir@
include @TOP_OBJDIR@/src/config/Makefile.config
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
# OS specific object files:
AFS_OS_OBJS = \
+ osi_crypto.o \
+ osi_gcpags.o \
osi_groups.o \
osi_inode.o \
+<sunx86_511 sun4x_511>
+ osi_ioctl.o \
+<all>
osi_file.o \
+ osi_kstat.o \
osi_sleep.o \
+ osi_vcache.o \
osi_vm.o \
- osi_vnodeops.o
+ osi_vnodeops.o \
+ rand-fortuna-kernel.o
AFS_OS_NFSOBJS = \
osi_vfsops_nfs.o
DEFINES= -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT
#These are redundant
#LD = /usr/ccs/bin/ld
-#LORDER = /usr/ccs/bin/lorder
#CC = /opt/SUNWspro/bin/cc
-KDEFS= -Dsun4c -DSUN4C_60 -DNFSCLIENT -DSYSACCT -DOLDSCSI -DVDDRV -D_KERNEL \
- -DSYSV -dn ${ARCH_DEFS}
+KDEFS= -D_KERNEL -DSYSV -dn ${ARCH_DEFS}
+<sunx86_510 sunx86_511>
+DBUG= -Wu,-save_args
-<sun4x_57 sun4x_58 sun4x_59>
-KDEFS_32 =
+<sun4x_58 sun4x_59 sun4x_510 sun4x_511>
+KDEFS_32 = -xarch=v8
KDEFS_64 = -xarch=v9
+<sunx86_58 sunx86_59 sunx86_510>
+KDEFS_32 =
+KDEFS_64 = -xarch=amd64 -xmodel=kernel
+
+<sunx86_511>
+KDEFS_32 =
+KDEFS_64 = -m64 -xmodel=kernel
+
<all>
-CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG}
+CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KDEFS) @SOLARIS_CC_KOPTS@ ${DBUG}
+
+<sun4x_58 sunx86_58 sun4x_59 sunx86_59>
+LDFLAGS=-r -dy -N drv/ip -N drv/udp -N strmod/rpcmod
+
+<all -sun4x_58 -sunx86_58 -sun4x_59 -sunx86_59>
+LDFLAGS=-r -dy -N drv/ip -N drv/udp -N strmod/rpcmod -N fs/ufs
# Name of directory to hold object files and libraries.
-<all -sun4x_57 -sun4x_58 -sun4x_59>
-KOBJ = MODLOAD
-<sun4x_57 sun4x_58 sun4x_59>
+<all -sun4x_510 -sun4x_511 -sunx86_511>
KOBJ = MODLOAD32 MODLOAD64
-
+<sun4x_510 sun4x_511 sunx86_511>
+KOBJ = MODLOAD64
# This tells Makefile.common to use it's single directory build target.
-<all -sun4x_57 -sun4x_58 -sun4x_59>
-COMPDIRS = single_compdir
-INSTDIRS = single_instdir
-DESTDIRS = single_destdir
-
-<sun4x_57 sun4x_58 sun4x_59>
+<all>
COMPDIRS = solaris_compdirs
INSTDIRS = solaris_instdirs
DESTDIRS = solaris_destdirs
-<all>
include Makefile.common
## This is the target for a Solaris 7. Here we build both the 32 bit and
## the 64 bit libafs in MODLOAD32 and MODLOAD64 directories respectively
-<sun4x_57 sun4x_58 sun4x_59>
-${COMPDIRS} ${INSTDIRS} ${DESTDIRS}:
+${COMPDIRS} ${INSTDIRS} ${DESTDIRS}: setup
for t in ${KOBJ} ; do \
echo Building directory: $$t ; \
case $$t in \
esac ; \
export ARCH_DEFS ; \
export BITS ; \
- cd $$t ; \
- $(MAKE) $@_libafs ; \
- cd ../ ;\
+ ( cd $$t && $(MAKE) $@_libafs ) || exit $$? ; \
done
solaris_compdirs_libafs: depsrcs libafs
solaris_instdirs_libafs: install_libafs
solaris_destdirs_libafs: dest_libafs
-<all>
-
# Below this line are targets when in the COMMON directory:
LIBAFS = libafs.o
LIBAFSNONFS = libafs.nonfs.o
-<all -sun4x_57 -sun4x_58 -sun4x_59>
-INST_LIBAFS = ${DESTDIR}${afskerneldir}/${LIBAFS}
-INST_LIBAFSNONFS = ${DESTDIR}${afskerneldir}/${LIBAFSNONFS}
+INST_LIBAFSNONFS = ${DESTDIR}${afskerneldir}/libafs${BITS}.nonfs.o
+INST_LIBAFS = ${DESTDIR}${afskerneldir}/libafs${BITS}.o
-DEST_LIBAFS = ${DEST}/root.client/usr/vice/etc/modload/${LIBAFS}
-DEST_LIBAFSNONFS = ${DEST}/root.client/usr/vice/etc/modload/${LIBAFSNONFS}
+DEST_LIBAFSNONFS = ${DEST}/root.client/usr/vice/etc/modload/libafs${BITS}.nonfs.o
+DEST_LIBAFS = ${DEST}/root.client/usr/vice/etc/modload/libafs${BITS}.o
# Without this line, gmake tries to build libafs.o
.PHONY: libafs
libafs: $(LIBAFSNONFS) $(LIBAFS)
-install_libafs: $(INST_LIBAFSNONFS) $(INST_LIBAFS)
-dest_libafs: $(DEST_LIBAFSNONFS) $(DEST_LIBAFS)
-
-
-$(INST_LIBAFS): $(LIBAFS)
- ${INSTALL} -f $? $@
-$(INST_LIBAFSNONFS): $(LIBAFSNONFS)
- ${INSTALL} -f $? $@
+install_libafs: $(LIBAFS) $(LIBAFSNONFS)
+ ${INSTALL} -d ${DESTDIR}${afskerneldir}
+ ${INSTALL} -m 644 $(LIBAFS) $(INST_LIBAFS)
+ ${INSTALL} -m 644 $(LIBAFSNONFS) $(INST_LIBAFSNONFS)
-$(DEST_LIBAFS): $(LIBAFS)
- ${INSTALL} -f $? $@
+dest_libafs: $(LIBAFS) $(LIBAFSNONFS)
+ ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/modload
+ ${INSTALL} -m 644 $(LIBAFS) $(DEST_LIBAFS)
+ ${INSTALL} -m 644 $(LIBAFSNONFS) $(DEST_LIBAFSNONFS)
-$(DEST_LIBAFSNONFS): $(LIBAFSNONFS)
- ${INSTALL} -f $? $@
+# See $TOP_SRCDIR/config/cc-wrapper for an explanation/usage of
+# OPENAFS_CC_WRAPPER_DEBUG_FLAG
-<all>
${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS)
$(RM) -f $@
- $(LD) -r -o $@ $(AFSAOBJS) ${AFSNFSOBJS}
+ OPENAFS_CC_WRAPPER_DEBUG_FLAG="$(KERN_DBG)" $(LD_WRAPPER) $(LD) $(LDFLAGS) -o $@ $(AFSAOBJS) ${AFSNFSOBJS}
${LIBAFSNONFS}: $(AFSAOBJS) $(AFSNONFSOBJS)
$(RM) -f $@
- $(LD) -r -o $@ $(AFSAOBJS) ${AFSNONFSOBJS}
-
-<sun4x_57 sun4x_58 sun4x_59>
-
-libafs: ${LIBAFSNONFS} ${LIBAFS}
-
-install_libafs: ${LIBAFSNONFS} ${LIBAFS}
- ${INSTALL} -f ${LIBAFSNONFS} ${DESTDIR}${afskerneldir}/libafs${BITS}.nonfs.o
- ${INSTALL} -f ${LIBAFS} ${DESTDIR}${afskerneldir}/libafs${BITS}.o
-
-dest_libafs: ${LIBAFSNONFS} ${LIBAFS}
- ${INSTALL} -f ${LIBAFSNONFS} ${DEST}/root.client/usr/vice/etc/modload/libafs${BITS}.nonfs.o
- ${INSTALL} -f ${LIBAFS} ${DEST}/root.client/usr/vice/etc/modload/libafs${BITS}.o
+ OPENAFS_CC_WRAPPER_DEBUG_FLAG="$(KERN_DBG)" $(LD_WRAPPER) $(LD) $(LDFLAGS) -o $@ $(AFSAOBJS) ${AFSNONFSOBJS}