Import Upstream version 1.8.5
[hcoop/debian/openafs.git] / src / libafs / MakefileProto.DUX.in
CommitLineData
805e021f
CE
1# Copyright 2000, International Business Machines Corporation and others.
2# All Rights Reserved.
3#
4# This software has been released under the terms of the IBM Public
5# License. For details, see the LICENSE file in the top-level source
6# directory or online at http://www.openafs.org/dl/license10.html
7
8srcdir=@srcdir@
9include @TOP_OBJDIR@/src/config/Makefile.config
10INSTALL = @INSTALL@
11INSTALL_DATA = @INSTALL_DATA@
12INSTALL_PROGRAM = @INSTALL_PROGRAM@
13INSTALL_SCRIPT = @INSTALL_SCRIPT@
14
15
16# OS specific object files:
17AFS_OS_OBJS = \
18 osi_gcpags.o \
19 osi_groups.o \
20 osi_file.o \
21 osi_inode.o \
22 osi_misc.o \
23 osi_sleep.o \
24 osi_vcache.o \
25 osi_vm.o \
26 osi_vnodeops.o
27
28AFS_OS_NFSOBJS = \
29 osi_vfsops_nfs.o
30
31AFS_OS_NONFSOBJS = \
32 osi_vfsops.o
33
34HEADER_RT = @HEADER_RT@
35
36# System specific build commands and flags
37KDEFS=-DLANGUAGE_C -G 4 -I/usr/sys/include -I../include \
38 -I/usr/sys/${HEADER_RT} -I/usr/sys/BINARY \
39 -DDEC3000_500 -DSWAPTYPE=1 -DUERF -DOSF -DCOMPAT_43 -DMACH -DUFS \
40 -DRT -DKERNEL -D_KERNEL -signed -no_excpt -Wb,-static -Wco,-nofloat \
41 -Olimit 1000 -D__alpha -Umips -UMIPS
42DBUG = -O2 -g3
43DEFINES= -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT
44OPTF=${OPT}
45OPTF2=${OPT2}
46CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG}
47
48
49# Name of directory to hold object files and libraries.
50KOBJ = STATIC
51
52# This tells Makefile.common to use it's single directory build target.
53COMPDIRS = single_compdir
54INSTDIRS = single_instdir
55DESTDIRS = single_destdir
56
57include Makefile.common
58
59setup:
60 -mkdir $(KOBJ)
61 -$(RM) $(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 net netinet rpc ufs nfs machine sys vm
66 -ln -fs /usr/sys/include/net net
67 -ln -fs /usr/sys/include/machine machine
68 -ln -fs /usr/sys/include/netinet netinet
69 -ln -fs /usr/sys/include/nfs nfs
70 -ln -fs /usr/sys/include/rpc rpc
71 -ln -fs /usr/sys/include/sys sys
72 -ln -fs /usr/sys/include/ufs ufs
73 -ln -fs /usr/sys/include/sys h
74 -ln -fs /usr/sys/include/vm vm
75 -touch $(KOBJ)/sec_net.h
76
77
78# Below this line are targets when in the COMMON directory:
79LIBAFS = libafs.o
80LIBAFSNONFS = libafs.nonfs.o
81AFSMOD = afs.mod
82
83INST_LIBAFS = ${DESTDIR}${afskerneldir}/${LIBAFS}
84INST_LIBAFSNONFS = ${DESTDIR}${afskerneldir}/${LIBAFSNONFS}
85INST_AFSMOD = ${DESTDIR}${afskerneldir}/${AFSMOD}
86
87DEST_LIBAFS = ${DEST}/root.client/bin/${LIBAFS}
88DEST_LIBAFSNONFS = ${DEST}/root.client/bin/${LIBAFSNONFS}
89DEST_AFSMOD = ${DEST}/root.client/bin/${AFSMOD}
90
91
92.PHONY: libafs install_libafs
93libafs: ${LIBAFSNONFS} ${AFSMOD}
94
95install_libafs: ${LIBAFSNONFS} ${AFSMOD}
96 ${INSTALL} -d ${DESTDIR}${afskerneldir}
97 $(INSTALL) -m 644 ${LIBAFSNONFS} ${INST_LIBAFSNONFS}
98 $(INSTALL) -m 644 ${AFSMOD} ${INST_AFSMOD}
99
100dest_libafs: ${LIBAFSNONFS} ${AFSMOD}
101 ${INSTALL} -d ${DEST}/root.client/bin
102 $(INSTALL) -m 644 ${LIBAFSNONFS} ${DEST_LIBAFSNONFS}
103 $(INSTALL) -m 644 ${AFSMOD} ${DEST_AFSMOD}
104
105${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS)
106 $(LD) -r -o ${LIBAFS} ${AFSAOBJS} ${AFSNFSOBJS}
107
108${LIBAFSNONFS}: $(AFSAOBJS) $(AFSNONFSOBJS)
109 $(LD) -r -o ${LIBAFSNONFS} ${AFSAOBJS} ${AFSNONFSOBJS}
110
111${AFSMOD}: ${LIBAFSNONFS}
112 $(LD) -dc -r -o ${AFSMOD} ${LIBAFSNONFS}