introduce-autoconf-for-openafs-20010628
[openafs.git] / src / libafs / MakefileProto.FBSD.in
1 #/* Copyright (C) 1995, 1989 Transarc Corporation - All rights reserved */
2 #
3 # MakefileProto for Digital Unix systems
4 #
5
6 DESTDIR=DEST/
7 # include ../config/Makefile.${SYS_NAME}
8
9 # OS specific object files:
10 AFS_OS_OBJS = \
11         osi_groups.o \
12         osi_file.o \
13         osi_inode.o \
14         osi_misc.o \
15         osi_sleep.o \
16         osi_vm.o \
17         osi_vnodeops.o 
18
19 AFS_OS_NFSOBJS = \
20         osi_vfsops_nfs.o
21
22 AFS_OS_NONFSOBJS = \
23         osi_vfsops.o
24
25
26 # System specific build commands and flags
27 # KDEFS=-DLANGUAGE_C  -I/usr/sys/include -I../include \
28 #        -I/usr/src/sys/${HEADER_RT} -I/usr/src/sys/sys \
29 #       -DSWAPTYPE=1 -DUERF -DOSF -DCOMPAT_43 -DUFS \
30 #       -DRT -DKERNEL -D_KERNEL
31 KDEFS=-Wall -fformat-extensions -ansi -nostdinc -I/usr/include -D_KERNEL \
32         -elf -mpreferred-stack-boundary=2 -I/usr/src/sys/sys -I../afs
33 DBUG = -O2
34 DEFINES= -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT
35 OPTF=${OPT} 
36 OPTF2=${OPT2} 
37 CFLAGS=-I. -I.. -I${TOP_SRCDIR}/config ${FSINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG}
38
39
40 # Name of directory to hold object files and libraries.
41 KOBJ = STATIC
42
43 # This tells Makefile.common to use it's single directory build target.
44 COMPDIRS = single_compdir
45
46 include Makefile.common
47
48 setup:
49         -mkdir $(KOBJ)
50         -rm $(KOBJ)/Makefile $(KOBJ)/Makefile.common
51         ln -s ../Makefile $(KOBJ)/Makefile
52         ln -s ../Makefile.common $(KOBJ)/Makefile.common
53         -rm -f  h net netinet rpc ufs nfs  machine sys vm
54         -ln -s /usr/src/sys/net net
55         -ln -s /usr/src/sys/i386/include machine
56         -ln -s /usr/src/sys/netinet netinet
57         -ln -s /usr/src/sys/nfs nfs
58         -ln -s /usr/include/rpc rpc
59         -ln -s /usr/src/sys/sys sys
60         -ln -s /usr/src/sys/ufs/ufs ufs
61         -ln -s /usr/src/sys/sys h
62         -ln -s /usr/src/sys/vm vm
63         -touch $(KOBJ)/sec_net.h
64
65
66 # Below this line are targets when in the COMMON directory:
67 LIBAFS = libafs.o
68 LIBAFSNONFS = libafs.nonfs.o
69
70 DEST_LIBAFS = ${DESTDIR}/root.client/bin/${LIBAFS}
71 DEST_LIBAFSNONFS = ${DESTDIR}/root.client/bin/${LIBAFSNONFS}
72
73
74 # libafs:       $(DEST_LIBAFS) $(DEST_LIBAFSNONFS)
75 # libafs:       $(DEST_LIBAFSNONFS)
76 libafs:
77         echo WARNING: No kernel module for ${SYS_NAME}
78
79
80 $(DEST_LIBAFS): $(LIBAFS)
81         $(INSTALL) -f $? $@
82
83 $(DEST_LIBAFSNONFS): $(LIBAFSNONFS)
84         $(INSTALL) -f $? $@
85
86 ${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS)
87         $(LD) -r -o ${LIBAFS} ${AFSAOBJS} ${AFSNFSOBJS}
88
89 ${LIBAFSNONFS}:  $(AFSAOBJS) $(AFSNONFSOBJS)
90         $(LD) -r -o ${LIBAFSNONFS} ${AFSAOBJS} ${AFSNONFSOBJS}
91
92
93 # Object build rules:
94 osi_groups.o: $(AFS)/osi_groups.c
95         $(CRULE1)
96 osi_file.o: $(AFS)/osi_file.c
97         $(CRULE1)
98 osi_inode.o: $(AFS)/osi_inode.c
99         $(CRULE1)
100 osi_misc.o: $(AFS)/osi_misc.c
101         $(CRULE1)
102 osi_sleep.o: $(AFS)/osi_sleep.c
103         $(CRULE1)
104 osi_vfsops_nfs.o: $(AFS)/osi_vfsops.c
105         $(CRULE1) -o osi_vfsops_nfs.o
106 osi_vfsops.o: $(AFS)/osi_vfsops.c
107         $(CRULE1) -DAFS_NONFSTRANS
108 osi_vm.o: $(AFS)/osi_vm.c
109         $(CRULE1)
110 osi_vnodeops.o: $(AFS)/osi_vnodeops.c
111         $(CRULE1)