Move contents of afs_osi_gcpags to per-OS files
[openafs.git] / src / libafs / MakefileProto.OBSD.in
index 898d748..60419b4 100644 (file)
@@ -1,26 +1,42 @@
-#/* 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
 #
 # OpenBSD version by Jim Rees
 
 srcdir=@srcdir@
 include @TOP_OBJDIR@/src/config/Makefile.config
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
 
 # System specific build commands and flags
-KSRC = /usr/src/sys
-KDEFS=-Wall -nostdinc -I/usr/include \
-       -DLKM -DDIAGNOSTIC -DFIFO -DNFSCLIENT -DMFS -DFFS -D_KERNEL -DI386_CPU -DI486_CPU -DI586_CPU \
-       -I${KSRC}/sys
-DBUG = -O2
+KSRC = @BSD_KERNEL_PATH@
+KFLAGS= -Wall -march=i486 -fno-builtin-printf -fno-builtin-log -nostdinc
+<i386_obsd33>
+KFLAGS+= -fno-stack-protector
+<all>
+KDEFS= \
+    ${KFLAGS} \
+    -I/usr/include -I${KSRC}/sys \
+    -DLKM -DDIAGNOSTIC -DFIFO -DNFSCLIENT -DMFS -DFFS -D_KERNEL -DI586_CPU \
+    -DI686_CPU
+DBUG= -O2
 DEFINES= -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT
 OPTF= ${OPT}
 OPTF2= ${OPT2}
-CFLAGS= ${FSINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG}
+CFLAGS= ${FSINCLUDES} ${DEFINES} ${KDEFS} ${KOPTS} ${DBUG}
 
 # Name of directory to hold object files and libraries.
-KOBJ = COMMON
+KOBJ = MODLOAD
 
 # OS specific object files:
 AFS_OS_OBJS = \
+       osi_gcpags.o \
        osi_groups.o \
        osi_file.o \
        osi_misc.o \
@@ -61,16 +77,15 @@ setup:
        -$(RM) -f  $(KOBJ)/Makefile $(KOBJ)/Makefile.common $(KOBJ)/config
        ln -fs ../Makefile $(KOBJ)/Makefile
        ln -fs ../Makefile.common $(KOBJ)/Makefile.common
-       ln -fs ../config $(KOBJ)/config
-       -$(RM) -f  h
+       -$(RM) -f  h lib
        -ln -fs ${KSRC}/sys h
+       -ln -fs ${KSRC}/lib .
        -touch $(KOBJ)/sec_net.h
 
 
 # Below this line are targets when in the COMMON directory:
-LIBAFS = libafs.o
+LIBAFS = libafs.nfs.o
 LIBAFSNONFS = libafs.o
-#LIBAFSNONFS = libafs.nonfs.o
 
 INST_LIBAFS = ${DESTDIR}${afskerneldir}/${LIBAFS}
 INST_LIBAFSNONFS = ${DESTDIR}${afskerneldir}/${LIBAFSNONFS}
@@ -79,24 +94,16 @@ DEST_LIBAFS = ${DEST}/root.client/bin/${LIBAFS}
 DEST_LIBAFSNONFS = ${DEST}/root.client/bin/${LIBAFSNONFS}
 
 
-# libafs:      $(LIBAFS) $(LIBAFSNONFS)
 libafs:        $(LIBAFSNONFS)
-# install_libafs:      $(INST_LIBAFS) $(INST_LIBAFSNONFS)
-install_libafs:        $(INST_LIBAFSNONFS)
-# dest_libafs: $(DEST_LIBAFS) $(DEST_LIBAFSNONFS)
-dest_libafs:   $(DEST_LIBAFSNONFS)
-
-$(INST_LIBAFS): $(LIBAFS)
-       $(INSTALL) -f $? $@
-
-$(INST_LIBAFSNONFS): $(LIBAFSNONFS)
-       $(INSTALL) -f $? $@
+       ls -l libafs.o
 
-$(DEST_LIBAFS): $(LIBAFS)
-       $(INSTALL) -f $? $@
+install_libafs:        $(LIBAFS)
+       ${INSTALL} -d ${DESTDIR}${afskerneldir}
+       ${INSTALL} -m 644 $(LIBAFS) $(INST_LIBAFSNONFS)
 
-$(DEST_LIBAFSNONFS): $(LIBAFSNONFS)
-       $(INSTALL) -f $? $@
+dest_libafs: $(LIBAFS)
+       ${INSTALL} -d ${DEST}/root.client/bin
+       $(INSTALL) -m 644 $(LIBAFS) $(DEST_LIBAFSNONFS)
 
 ${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS)
        $(LD) -r -o ${LIBAFS} ${AFSAOBJS} ${AFSNFSOBJS}