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