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