Updates to the Cache Manager to include NetBSD5 support
[openafs.git] / src / libafs / MakefileProto.NBSD.in
1 # Copyright 2000, International Business Machines Corporation and others.
2 # All Rights Reserved.
3 #
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
7 #
8 srcdir=@srcdir@
9 include @TOP_OBJDIR@/src/config/Makefile.config
10 INSTALL = @INSTALL@
11 INSTALL_DATA = @INSTALL_DATA@
12 INSTALL_PROGRAM = @INSTALL_PROGRAM@
13 INSTALL_SCRIPT = @INSTALL_SCRIPT@
14
15
16 # OS specific object files:
17 AFS_OS_OBJS = \
18         osi_gcpags.o \
19         osi_groups.o \
20         osi_file.o \
21         osi_inode.o \
22         osi_misc.o \
23         osi_sleep.o \
24         osi_vcache.o \
25         osi_vm.o \
26         osi_vnodeops.o
27
28 AFS_OS_NFSOBJS = \
29         osi_vfsops_nfs.o
30
31 AFS_OS_NONFSOBJS = \
32         osi_vfsops.o
33
34
35 # System specific build commands and flags
36 KSRC = @BSD_KERNEL_PATH@
37 KBLD = @BSD_KERNEL_BUILD@
38 KARCHFLAGS = -Di386 -march=pentiumpro -mtune=pentiumpro 
39 KOPTFLAGS = -D_KERNEL -DLKM -D_LKM -DDEBUG -DLOCKDEBUG
40 KDEFS=-Wall -ansi -nostdinc -I/usr/include \
41         ${KARCHFLAGS} ${KOPTFLAGS} \
42         -ffreestanding -Wno-pointer-sign -Wno-strict-aliasing \
43 <i386_nbsd50>
44         -std=gnu99 \
45 <all>
46         -I${KSRC} -I${KSRC}/sys \
47         -I${KBLD} -I../afs
48 DBUG = -O2 -g3
49 DEFINES= -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT
50 OPTF=${OPT} 
51 OPTF2=${OPT2} 
52 CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG}
53
54
55 # Name of directory to hold object files and libraries.
56 KOBJ = MODLOAD
57
58 # This tells Makefile.common to use it's single directory build target.
59 COMPDIRS = single_compdir
60 INSTDIRS = single_instdir
61 DESTDIRS = single_destdir
62
63 include Makefile.common
64
65 setup:
66         -mkdir $(KOBJ)
67         -$(RM) $(KOBJ)/Makefile $(KOBJ)/Makefile.common $(KOBJ)/config
68         ln -fs ../Makefile $(KOBJ)/Makefile
69         ln -fs ../Makefile.common $(KOBJ)/Makefile.common
70         ln -fs ../config $(KOBJ)/config
71         -$(RM) -f  h net netinet rpc ufs nfs  machine sys vm
72         -ln -fs ${KSRC}/net net
73         -ln -fs ${KSRC}/i386/include machine
74         -ln -fs ${KSRC}/netinet netinet
75         -ln -fs ${KSRC}/nfs nfs
76         -ln -fs /usr/include/rpc rpc
77         -ln -fs ${KSRC}/sys sys
78         -ln -fs ${KSRC}/ufs/ufs ufs
79         -ln -fs ${KSRC}/sys h
80         -ln -fs ${KSRC}/vm vm
81         -ln -fs ${KSRC}/arch/x86/include/via_padlock.h /usr/include/x86/via_padlock.h
82         -ln -fs ${KSRC}/arch/x86/include/cpufunc.h /usr/include/x86/cpufunc.h
83         -ln -fs ${KSRC}/arch/x86/include/pic.h /usr/include/machine/pic.h
84         -touch $(KOBJ)/sec_net.h
85
86
87 # Below this line are targets when in the COMMON directory:
88 LIBAFS = libafs.o
89 LIBAFSNONFS = libafs.nonfs.o
90
91 INST_LIBAFS = ${DESTDIR}${afskerneldir}/${LIBAFS}
92 INST_LIBAFSNONFS = ${DESTDIR}${afskerneldir}/${LIBAFSNONFS}
93
94 DEST_LIBAFS = ${DEST}/root.client/bin/${LIBAFS}
95 DEST_LIBAFSNONFS = ${DEST}/root.client/bin/${LIBAFSNONFS}
96
97 <i386_nbsd40 i386_nbsd50>
98 # libafs:       $(LIBAFS) $(LIBAFSNONFS)
99 libafs: $(LIBAFSNONFS)
100 # install_libafs:       $(INST_LIBAFS) $(INST_LIBAFSNONFS)
101 #install_libafs:        $(INST_LIBAFSNONFS)
102 install_libafs: 
103 # dest_libafs:  $(DEST_LIBAFS) $(DEST_LIBAFSNONFS)
104 dest_libafs:    $(DEST_LIBAFSNONFS)
105 <all -i386_nbsd40 -i386_nbsd50>
106 libafs:
107         echo WARNING: No kernel module for ${SYS_NAME}
108
109 install_libafs:
110         echo WARNING: No kernel module for ${SYS_NAME}
111
112 dest_libafs:
113         echo WARNING: No kernel module for ${SYS_NAME}
114 <all>
115
116 # for now, just skip it
117 #${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS)
118 #       $(LD) -r -z muldefs -o ${LIBAFS} ${AFSAOBJS} ${AFSNFSOBJS}
119
120 ${LIBAFSNONFS}:  $(AFSAOBJS) $(AFSNONFSOBJS)
121         $(LD) -r -z muldefs -o ${LIBAFSNONFS} ${AFSAOBJS} ${AFSNONFSOBJS}