~ubuntu-branches/ubuntu/warty/openafs/warty

« back to all changes in this revision

Viewing changes to src/libafs/MakefileProto.FBSD.in

  • Committer: Bazaar Package Importer
  • Author(s): Sam Hartman
  • Date: 2004-01-10 16:37:33 UTC
  • Revision ID: james.westby@ubuntu.com-20040110163733-jvr0n1uahshlb1uu
Tags: upstream-1.2.11
ImportĀ upstreamĀ versionĀ 1.2.11

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# MakefileProto for FreeBSD systems
 
3
#
 
4
DEST=@DEST@
 
5
TOP_INCDIR=@TOP_INCDIR@
 
6
TOP_LIBDIR=@TOP_LIBDIR@
 
7
TOP_SRCDIR=@TOP_SRCDIR@
 
8
prefix=@prefix@
 
9
exec_prefix=@exec_prefix@
 
10
bindir=@bindir@
 
11
sbindir=@sbindir@
 
12
libexecdir=@libexecdir@
 
13
libdir=@libdir@
 
14
includedir=@includedir@
 
15
mandir=@mandir@
 
16
afssrvbindir=@afssrvbindir@
 
17
afssrvsbindir=@afssrvsbindir@
 
18
afssrvlibexecdir=@afssrvlibexecdir@
 
19
afskerneldir=@afskerneldir@
 
20
SYS_NAME=@AFS_SYSNAME@
 
21
 
 
22
include config/Makefile.${SYS_NAME}
 
23
 
 
24
# OS specific object files:
 
25
AFS_OS_OBJS = \
 
26
        osi_groups.o \
 
27
        osi_file.o \
 
28
        osi_inode.o \
 
29
        osi_misc.o \
 
30
        osi_sleep.o \
 
31
        osi_vm.o \
 
32
        osi_vnodeops.o \
 
33
        osi_module.o 
 
34
 
 
35
AFS_OS_NFSOBJS = \
 
36
        osi_vfsops_nfs.o
 
37
 
 
38
AFS_OS_NONFSOBJS = \
 
39
        osi_vfsops.o
 
40
 
 
41
 
 
42
# System specific build commands and flags
 
43
# KDEFS=-DLANGUAGE_C  -I/usr/sys/include -I../include \
 
44
#        -I/usr/src/sys/${HEADER_RT} -I/usr/src/sys/sys \
 
45
#       -DSWAPTYPE=1 -DUERF -DOSF -DCOMPAT_43 -DUFS \
 
46
#       -DRT -DKERNEL -D_KERNEL
 
47
KDEFS=-Wall -fformat-extensions -ansi -nostdinc -I/usr/include -D_KERNEL \
 
48
        -DKLD_MODULE -elf -mpreferred-stack-boundary=2 -I.. -I../afs
 
49
DBUG = -O2
 
50
DEFINES= -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT
 
51
OPTF=${OPT} 
 
52
OPTF2=${OPT2} 
 
53
CFLAGS=-I. -I.. -I${TOP_SRCDIR}/config ${FSINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG}
 
54
 
 
55
 
 
56
# Name of directory to hold object files and libraries.
 
57
KOBJ = STATIC
 
58
 
 
59
# This tells Makefile.common to use it's single directory build target.
 
60
COMPDIRS = single_compdir
 
61
INSTDIRS = single_instdir
 
62
DESTDIRS = single_destdir
 
63
 
 
64
include Makefile.common
 
65
 
 
66
setup:
 
67
        -mkdir $(KOBJ)
 
68
        -$(RM) $(KOBJ)/Makefile $(KOBJ)/Makefile.common $(KOBJ)/config
 
69
        ln -s ../Makefile $(KOBJ)/Makefile
 
70
        ln -s ../Makefile.common $(KOBJ)/Makefile.common
 
71
        ln -s ../config $(KOBJ)/config
 
72
        -$(RM) -f  h net netinet rpc ufs nfs  machine sys vm
 
73
        -ln -s /usr/src/sys/net net
 
74
        -ln -s /usr/src/sys/i386/include machine
 
75
        -ln -s /usr/src/sys/netinet netinet
 
76
        -ln -s /usr/src/sys/nfs nfs
 
77
        -ln -s /usr/include/rpc rpc
 
78
        -ln -s /usr/src/sys/sys sys
 
79
        -ln -s /usr/src/sys/ufs/ufs ufs
 
80
        -ln -s /usr/src/sys/sys h
 
81
        -ln -s /usr/src/sys/vm vm
 
82
        -touch $(KOBJ)/sec_net.h
 
83
 
 
84
 
 
85
# Below this line are targets when in the COMMON directory:
 
86
LIBAFS = libafs.ko
 
87
LIBAFSNONFS = libafs.nonfs.ko
 
88
 
 
89
INST_LIBAFS = ${DESTDIR}${afskerneldir}/${LIBAFS}
 
90
INST_LIBAFSNONFS = ${DESTDIR}${afskerneldir}/${LIBAFSNONFS}
 
91
 
 
92
DEST_LIBAFS = ${DEST}/root.client/bin/${LIBAFS}
 
93
DEST_LIBAFSNONFS = ${DEST}/root.client/bin/${LIBAFSNONFS}
 
94
 
 
95
# Without this line, gmake tries to build libafs.o
 
96
.PHONY: libafs
 
97
 
 
98
# libafs:       $(LIBAFS) $(LIBAFSNONFS)
 
99
libafs: $(LIBAFSNONFS)
 
100
# install_libafs:       $(INST_LIBAFS) $(INST_LIBAFSNONFS)
 
101
install_libafs: $(INST_LIBAFSNONFS)
 
102
# dest_libafs:  $(DEST_LIBAFS) $(DEST_LIBAFSNONFS)
 
103
dest_libafs:    $(DEST_LIBAFSNONFS)
 
104
 
 
105
 
 
106
$(INST_LIBAFS): $(LIBAFS)
 
107
        $(INSTALL) -f $? $@
 
108
 
 
109
$(INST_LIBAFSNONFS): $(LIBAFSNONFS)
 
110
        $(INSTALL) -f $? $@
 
111
 
 
112
$(DEST_LIBAFS): $(LIBAFS)
 
113
        $(INSTALL) -f $? $@
 
114
 
 
115
$(DEST_LIBAFSNONFS): $(LIBAFSNONFS)
 
116
        $(INSTALL) -f $? $@
 
117
 
 
118
${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS)
 
119
        $(LD) -r -o ${LIBAFS}.kld ${AFSAOBJS} ${AFSNFSOBJS}
 
120
        gensetdefs ${LIBAFS}.kld
 
121
        $(MAKE) setdef0.o setdef1.o
 
122
        $(LD) -Bshareable -o ${LIBAFS} setdef0.o ${LIBAFS}.kld setdef1.o
 
123
 
 
124
${LIBAFSNONFS}:  $(AFSAOBJS) $(AFSNONFSOBJS)
 
125
        $(LD) -r -o ${LIBAFSNONFS}.kld ${AFSAOBJS} ${AFSNONFSOBJS}
 
126
        gensetdefs ${LIBAFSNONFS}.kld
 
127
        $(MAKE) setdef0.o setdef1.o
 
128
        $(LD) -Bshareable -o ${LIBAFSNONFS} setdef0.o ${LIBAFSNONFS}.kld setdef1.o
 
129
 
 
130
 
 
131
# Object build rules:
 
132
osi_groups.o: $(AFS)/osi_groups.c
 
133
        $(CRULE1)
 
134
osi_file.o: $(AFS)/osi_file.c
 
135
        $(CRULE1)
 
136
osi_inode.o: $(AFS)/osi_inode.c
 
137
        $(CRULE1)
 
138
osi_misc.o: $(AFS)/osi_misc.c
 
139
        $(CRULE1)
 
140
osi_sleep.o: $(AFS)/osi_sleep.c
 
141
        $(CRULE1)
 
142
osi_vfsops_nfs.o: $(AFS)/osi_vfsops.c
 
143
        $(CRULE1) -o osi_vfsops_nfs.o
 
144
osi_vfsops.o: $(AFS)/osi_vfsops.c
 
145
        $(CRULE1) -DAFS_NONFSTRANS
 
146
osi_vm.o: $(AFS)/osi_vm.c
 
147
        $(CRULE1)
 
148
osi_vnodeops.o: $(AFS)/osi_vnodeops.c
 
149
        $(CRULE1)
 
150
osi_module.o: $(AFS)/osi_module.c
 
151
        $(CRULE1)   
 
152
setdef0.o: setdef0.c
 
153
        $(CRULE1)
 
154
setdef1.o: setdef1.c
 
155
        $(CRULE1)