openbsd-20021115
[openafs.git] / src / libafs / MakefileProto.OBSD.in
1 #/* Copyright (C) 1995, 1989 Transarc Corporation - All rights reserved */
2 #
3 # OpenBSD version by Jim Rees
4
5 srcdir=@srcdir@
6 include @TOP_OBJDIR@/src/config/Makefile.config
7
8 # System specific build commands and flags
9 KSRC = /usr/src/sys
10 KDEFS=-Wall -nostdinc -I/usr/include \
11         -DLKM -DDIAGNOSTIC -DFIFO -DNFSCLIENT -DMFS -DFFS -D_KERNEL -DI586_CPU -DI686_CPU \
12         -I${KSRC}/sys
13 DBUG = -O2
14 DEFINES= -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT
15 OPTF= ${OPT}
16 OPTF2= ${OPT2}
17 CFLAGS= ${FSINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG}
18
19 # Name of directory to hold object files and libraries.
20 KOBJ = MODLOAD
21
22 # OS specific object files:
23 AFS_OS_OBJS = \
24         osi_groups.o \
25         osi_file.o \
26         osi_misc.o \
27         osi_sleep.o \
28         osi_vm.o \
29         osi_vnodeops.o
30
31 #AFS_OS_NFSOBJS = osi_vfsops_nfs.o
32
33 AFS_OS_NONFSOBJS = osi_vfsops.o
34
35 # This tells Makefile.common to use its single directory build target.
36 COMPDIRS = single_compdir
37 INSTDIRS = single_instdir
38 DESTDIRS = single_destdir
39
40 TOP_SRCDIR = ../..
41
42 include Makefile.common
43
44 COMMON_INCLUDE = \
45         -I.. \
46         -I../nfs \
47         -I${TOP_SRCDIR} \
48         -I${TOP_SRCDIR}/afs \
49         -I${TOP_SRCDIR}/afs/${MKAFS_OSTYPE} \
50         -I${TOP_SRCDIR}/config \
51         -I${TOP_SRCDIR}/rx \
52         -I${TOP_SRCDIR}/rx/${MKAFS_OSTYPE} \
53         -I${TOP_SRCDIR}/rxkad \
54         -I${TOP_SRCDIR}/domestic \
55         -I${TOP_SRCDIR}/util \
56         -I${TOP_SRCDIR}/../include \
57         -I${TOP_SRCDIR}/../include/afs
58
59 setup:
60         -mkdir $(KOBJ)
61         -$(RM) -f  $(KOBJ)/Makefile $(KOBJ)/Makefile.common $(KOBJ)/config
62         ln -fs ../Makefile $(KOBJ)/Makefile
63         ln -fs ../Makefile.common $(KOBJ)/Makefile.common
64         ln -fs ../config $(KOBJ)/config
65         -$(RM) -f  h
66         -ln -fs ${KSRC}/sys h
67         -touch $(KOBJ)/sec_net.h
68
69
70 # Below this line are targets when in the COMMON directory:
71 LIBAFS = libafs.nfs.o
72 LIBAFSNONFS = libafs.o
73
74 INST_LIBAFS = ${DESTDIR}${afskerneldir}/${LIBAFS}
75 INST_LIBAFSNONFS = ${DESTDIR}${afskerneldir}/${LIBAFSNONFS}
76
77 DEST_LIBAFS = ${DEST}/root.client/bin/${LIBAFS}
78 DEST_LIBAFSNONFS = ${DEST}/root.client/bin/${LIBAFSNONFS}
79
80
81 libafs: $(LIBAFSNONFS)
82         ls -l libafs.o
83 install_libafs: $(INST_LIBAFSNONFS)
84 dest_libafs:    $(DEST_LIBAFSNONFS)
85
86 $(INST_LIBAFS): $(LIBAFS)
87         $(INSTALL) -f $? $@
88
89 $(INST_LIBAFSNONFS): $(LIBAFSNONFS)
90         $(INSTALL) -f $? $@
91
92 $(DEST_LIBAFS): $(LIBAFS)
93         $(INSTALL) -f $? $@
94
95 $(DEST_LIBAFSNONFS): $(LIBAFSNONFS)
96         $(INSTALL) -f $? $@
97
98 ${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS)
99         $(LD) -r -o ${LIBAFS} ${AFSAOBJS} ${AFSNFSOBJS}
100
101 ${LIBAFSNONFS}:  $(AFSAOBJS) $(AFSNONFSOBJS)
102         $(LD) -r -o ${LIBAFSNONFS} ${AFSAOBJS} ${AFSNONFSOBJS}