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