cleanup-licensing-and-transarc-references-20030309
[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
11
12 # OS specific object files:
13 AFS_OS_OBJS = \
14         osi_groups.o \
15         osi_file.o \
16         osi_inode.o \
17         osi_misc.o \
18         osi_sleep.o \
19         osi_vm.o \
20         osi_vnodeops.o
21
22 AFS_OS_NFSOBJS = \
23         osi_vfsops_nfs.o
24
25 AFS_OS_NONFSOBJS = \
26         osi_vfsops.o
27
28
29 # System specific build commands and flags
30 KDEFS=-Wall -fformat-extensions -ansi -nostdinc -I/usr/include -D_KERNEL \
31         -elf -mpreferred-stack-boundary=2 -I/usr/src/sys/sys -I../afs
32 DBUG = -O2
33 DEFINES= -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT
34 OPTF=${OPT} 
35 OPTF2=${OPT2} 
36 CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG}
37
38
39 # Name of directory to hold object files and libraries.
40 KOBJ = STATIC
41
42 # This tells Makefile.common to use it's single directory build target.
43 COMPDIRS = single_compdir
44 INSTDIRS = single_instdir
45 DESTDIRS = single_destdir
46
47 include Makefile.common
48
49 setup:
50         -mkdir $(KOBJ)
51         -$(RM) $(KOBJ)/Makefile $(KOBJ)/Makefile.common $(KOBJ)/config
52         ln -fs ../Makefile $(KOBJ)/Makefile
53         ln -fs ../Makefile.common $(KOBJ)/Makefile.common
54         ln -fs ../config $(KOBJ)/config
55         -$(RM) -f  h net netinet rpc ufs nfs  machine sys vm
56         -ln -fs /usr/src/sys/net net
57         -ln -fs /usr/src/sys/i386/include machine
58         -ln -fs /usr/src/sys/netinet netinet
59         -ln -fs /usr/src/sys/nfs nfs
60         -ln -fs /usr/include/rpc rpc
61         -ln -fs /usr/src/sys/sys sys
62         -ln -fs /usr/src/sys/ufs/ufs ufs
63         -ln -fs /usr/src/sys/sys h
64         -ln -fs /usr/src/sys/vm vm
65         -touch $(KOBJ)/sec_net.h
66
67
68 # Below this line are targets when in the COMMON directory:
69 LIBAFS = libafs.o
70 LIBAFSNONFS = libafs.nonfs.o
71
72 INST_LIBAFS = ${DESTDIR}${afskerneldir}/${LIBAFS}
73 INST_LIBAFSNONFS = ${DESTDIR}${afskerneldir}/${LIBAFSNONFS}
74
75 DEST_LIBAFS = ${DEST}/root.client/bin/${LIBAFS}
76 DEST_LIBAFSNONFS = ${DEST}/root.client/bin/${LIBAFSNONFS}
77
78
79 # libafs:       $(LIBAFS) $(LIBAFSNONFS)
80 # libafs:       $(LIBAFSNONFS)
81 # install_libafs:       $(INST_LIBAFS) $(INST_LIBAFSNONFS)
82 # install_libafs:       $(INST_LIBAFSNONFS)
83 # dest_libafs:  $(DEST_LIBAFS) $(DEST_LIBAFSNONFS)
84 # dest_libafs:  $(DEST_LIBAFSNONFS)
85 libafs:
86         echo WARNING: No kernel module for ${SYS_NAME}
87
88 install_libafs:
89         echo WARNING: No kernel module for ${SYS_NAME}
90
91 dest_libafs:
92         echo WARNING: No kernel module for ${SYS_NAME}
93
94
95 $(INST_LIBAFS): $(LIBAFS)
96         $(INSTALL) -f $? $@
97
98 $(INST_LIBAFSNONFS): $(LIBAFSNONFS)
99         $(INSTALL) -f $? $@
100
101 $(DEST_LIBAFS): $(LIBAFS)
102         $(INSTALL) -f $? $@
103
104 $(DEST_LIBAFSNONFS): $(LIBAFSNONFS)
105         $(INSTALL) -f $? $@
106
107 ${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS)
108         $(LD) -r -o ${LIBAFS} ${AFSAOBJS} ${AFSNFSOBJS}
109
110 ${LIBAFSNONFS}:  $(AFSAOBJS) $(AFSNONFSOBJS)
111         $(LD) -r -o ${LIBAFSNONFS} ${AFSAOBJS} ${AFSNONFSOBJS}