-#/* Copyright (C) 1995, 1989 Transarc Corporation - All rights reserved */
+# Copyright 2000, International Business Machines Corporation and others.
+# All Rights Reserved.
+#
+# This software has been released under the terms of the IBM Public
+# License. For details, see the LICENSE file in the top-level source
+# directory or online at http://www.openafs.org/dl/license10.html
#
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_file.o \
osi_inode.o \
osi_misc.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
# System specific build commands and flags
-KDEFS=-Wall -fformat-extensions -ansi -nostdinc -I/usr/include -D_KERNEL \
- -elf -mpreferred-stack-boundary=2 -I/usr/src/sys/sys -I../afs
-DBUG = -O2
+KSRC = @BSD_KERNEL_PATH@
+KBLD = @BSD_KERNEL_BUILD@
+KARCHFLAGS = -Di386 -march=pentiumpro -mtune=pentiumpro
+KOPTFLAGS = -D_KERNEL -DLKM -D_LKM -DDEBUG -DLOCKDEBUG
+KDEFS=-Wall -ansi -nostdinc -I/usr/include \
+ ${KARCHFLAGS} ${KOPTFLAGS} \
+ -ffreestanding -Wno-pointer-sign -Wno-strict-aliasing \
+<i386_nbsd50>
+ -std=gnu99 \
+<all>
+ -I${KSRC} -I${KSRC}/sys \
+ -I${KBLD} -I../afs
+DBUG = -O2 -g3
DEFINES= -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT
OPTF=${OPT}
OPTF2=${OPT2}
# Name of directory to hold object files and libraries.
-KOBJ = STATIC
+KOBJ = MODLOAD
# This tells Makefile.common to use it's single directory build target.
COMPDIRS = single_compdir
ln -fs ../Makefile.common $(KOBJ)/Makefile.common
ln -fs ../config $(KOBJ)/config
-$(RM) -f h net netinet rpc ufs nfs machine sys vm
- -ln -fs /usr/src/sys/net net
- -ln -fs /usr/src/sys/i386/include machine
- -ln -fs /usr/src/sys/netinet netinet
- -ln -fs /usr/src/sys/nfs nfs
+ -ln -fs ${KSRC}/net net
+ -ln -fs ${KSRC}/i386/include machine
+ -ln -fs ${KSRC}/netinet netinet
+ -ln -fs ${KSRC}/nfs nfs
-ln -fs /usr/include/rpc rpc
- -ln -fs /usr/src/sys/sys sys
- -ln -fs /usr/src/sys/ufs/ufs ufs
- -ln -fs /usr/src/sys/sys h
- -ln -fs /usr/src/sys/vm vm
+ -ln -fs ${KSRC}/sys sys
+ -ln -fs ${KSRC}/ufs/ufs ufs
+ -ln -fs ${KSRC}/sys h
+ -ln -fs ${KSRC}/vm vm
+ -ln -fs ${KSRC}/arch/x86/include/via_padlock.h /usr/include/x86/via_padlock.h
+ -ln -fs ${KSRC}/arch/x86/include/cpufunc.h /usr/include/x86/cpufunc.h
+ -ln -fs ${KSRC}/arch/x86/include/pic.h /usr/include/machine/pic.h
-touch $(KOBJ)/sec_net.h
DEST_LIBAFS = ${DEST}/root.client/bin/${LIBAFS}
DEST_LIBAFSNONFS = ${DEST}/root.client/bin/${LIBAFSNONFS}
-
+<i386_nbsd40 i386_nbsd50>
# libafs: $(LIBAFS) $(LIBAFSNONFS)
-# libafs: $(LIBAFSNONFS)
+libafs: $(LIBAFSNONFS)
# install_libafs: $(INST_LIBAFS) $(INST_LIBAFSNONFS)
-# install_libafs: $(INST_LIBAFSNONFS)
+#install_libafs: $(INST_LIBAFSNONFS)
+install_libafs:
# dest_libafs: $(DEST_LIBAFS) $(DEST_LIBAFSNONFS)
-# dest_libafs: $(DEST_LIBAFSNONFS)
+dest_libafs: $(DEST_LIBAFSNONFS)
+<all -i386_nbsd40 -i386_nbsd50>
libafs:
echo WARNING: No kernel module for ${SYS_NAME}
dest_libafs:
echo WARNING: No kernel module for ${SYS_NAME}
+<all>
-
-$(INST_LIBAFS): $(LIBAFS)
- $(INSTALL) -f $? $@
-
-$(INST_LIBAFSNONFS): $(LIBAFSNONFS)
- $(INSTALL) -f $? $@
-
-$(DEST_LIBAFS): $(LIBAFS)
- $(INSTALL) -f $? $@
-
-$(DEST_LIBAFSNONFS): $(LIBAFSNONFS)
- $(INSTALL) -f $? $@
-
-${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS)
- $(LD) -r -o ${LIBAFS} ${AFSAOBJS} ${AFSNFSOBJS}
+# for now, just skip it
+#${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS)
+# $(LD) -r -z muldefs -o ${LIBAFS} ${AFSAOBJS} ${AFSNFSOBJS}
${LIBAFSNONFS}: $(AFSAOBJS) $(AFSNONFSOBJS)
- $(LD) -r -o ${LIBAFSNONFS} ${AFSAOBJS} ${AFSNONFSOBJS}
-
-
-# Object build rules:
-osi_groups.o: $(AFS)/osi_groups.c
- $(CRULE1)
-osi_file.o: $(AFS)/osi_file.c
- $(CRULE1)
-osi_inode.o: $(AFS)/osi_inode.c
- $(CRULE1)
-osi_misc.o: $(AFS)/osi_misc.c
- $(CRULE1)
-osi_sleep.o: $(AFS)/osi_sleep.c
- $(CRULE1)
-osi_vfsops_nfs.o: $(AFS)/osi_vfsops.c
- $(CRULE1) -o osi_vfsops_nfs.o
-osi_vfsops.o: $(AFS)/osi_vfsops.c
- $(CRULE1) -DAFS_NONFSTRANS
-osi_vm.o: $(AFS)/osi_vm.c
- $(CRULE1)
-osi_vnodeops.o: $(AFS)/osi_vnodeops.c
- $(CRULE1)
+ $(LD) -r -z muldefs -o ${LIBAFSNONFS} ${AFSAOBJS} ${AFSNONFSOBJS}