e9005d685598c33a542a2dc815b5ddcc0d7bdd70
[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 = -march=pentiumpro -mtune=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         -I${KSRC} -I${KSRC}/sys \
44         -I${KBLD} -I../afs
45 DBUG = -O2
46 DEFINES= -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT
47 OPTF=${OPT} 
48 OPTF2=${OPT2} 
49 CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG}
50
51
52 # Name of directory to hold object files and libraries.
53 KOBJ = MODLOAD
54
55 # This tells Makefile.common to use it's single directory build target.
56 COMPDIRS = single_compdir
57 INSTDIRS = single_instdir
58 DESTDIRS = single_destdir
59
60 include Makefile.common
61
62 setup:
63         -mkdir $(KOBJ)
64         -$(RM) $(KOBJ)/Makefile $(KOBJ)/Makefile.common $(KOBJ)/config
65         ln -fs ../Makefile $(KOBJ)/Makefile
66         ln -fs ../Makefile.common $(KOBJ)/Makefile.common
67         ln -fs ../config $(KOBJ)/config
68         -$(RM) -f  h net netinet rpc ufs nfs  machine sys vm
69         -ln -fs ${KSRC}/net net
70         -ln -fs ${KSRC}/i386/include machine
71         -ln -fs ${KSRC}/netinet netinet
72         -ln -fs ${KSRC}/nfs nfs
73         -ln -fs /usr/include/rpc rpc
74         -ln -fs ${KSRC}/sys sys
75         -ln -fs ${KSRC}/ufs/ufs ufs
76         -ln -fs ${KSRC}/sys h
77         -ln -fs ${KSRC}/vm vm
78         -touch $(KOBJ)/sec_net.h
79
80
81 # Below this line are targets when in the COMMON directory:
82 LIBAFS = libafs.o
83 LIBAFSNONFS = libafs.nonfs.o
84
85 INST_LIBAFS = ${DESTDIR}${afskerneldir}/${LIBAFS}
86 INST_LIBAFSNONFS = ${DESTDIR}${afskerneldir}/${LIBAFSNONFS}
87
88 DEST_LIBAFS = ${DEST}/root.client/bin/${LIBAFS}
89 DEST_LIBAFSNONFS = ${DEST}/root.client/bin/${LIBAFSNONFS}
90
91 <i386_nbsd40>
92 # libafs:       $(LIBAFS) $(LIBAFSNONFS)
93 libafs: $(LIBAFSNONFS)
94 # install_libafs:       $(INST_LIBAFS) $(INST_LIBAFSNONFS)
95 install_libafs: $(INST_LIBAFSNONFS)
96 # dest_libafs:  $(DEST_LIBAFS) $(DEST_LIBAFSNONFS)
97 dest_libafs:    $(DEST_LIBAFSNONFS)
98 <all -i386_nbsd40>
99 libafs:
100         echo WARNING: No kernel module for ${SYS_NAME}
101
102 install_libafs:
103         echo WARNING: No kernel module for ${SYS_NAME}
104
105 dest_libafs:
106         echo WARNING: No kernel module for ${SYS_NAME}
107 <all>
108
109 # for now, just skip it
110 #${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS)
111 #       $(LD) -r -o ${LIBAFS} ${AFSAOBJS} ${AFSNFSOBJS}
112
113 ${LIBAFSNONFS}:  $(AFSAOBJS) $(AFSNONFSOBJS)
114         $(LD) -r -o ${LIBAFSNONFS} ${AFSAOBJS} ${AFSNONFSOBJS}