death-to-pinstall-20060801
[openafs.git] / src / libafs / MakefileProto.DUX.in
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
8 srcdir=@srcdir@
9 include @TOP_OBJDIR@/src/config/Makefile.config
10
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 HEADER_RT = @HEADER_RT@
29
30 # System specific build commands and flags
31 KDEFS=-DLANGUAGE_C -G 4 -I/usr/sys/include -I../include \
32          -I/usr/sys/${HEADER_RT} -I/usr/sys/BINARY \
33         -DDEC3000_500 -DSWAPTYPE=1 -DUERF -DOSF -DCOMPAT_43 -DMACH -DUFS \
34         -DRT -DKERNEL -D_KERNEL  -signed  -no_excpt -Wb,-static -Wco,-nofloat \
35         -Olimit 1000 -D__alpha -Umips -UMIPS 
36 DBUG = -O2 -g3
37 DEFINES= -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT
38 OPTF=${OPT} 
39 OPTF2=${OPT2} 
40 CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/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 INSTDIRS = single_instdir
49 DESTDIRS = single_destdir
50
51 include Makefile.common
52
53 setup:
54         -mkdir $(KOBJ)
55         -$(RM) $(KOBJ)/Makefile $(KOBJ)/Makefile.common $(KOBJ)/config
56         ln -fs ../Makefile $(KOBJ)/Makefile
57         ln -fs ../Makefile.common $(KOBJ)/Makefile.common
58         ln -fs ../config $(KOBJ)/config
59         -$(RM) -f  h net netinet rpc ufs nfs  machine sys vm
60         -ln -fs /usr/sys/include/net net
61         -ln -fs /usr/sys/include/machine machine
62         -ln -fs /usr/sys/include/netinet netinet
63         -ln -fs /usr/sys/include/nfs nfs
64         -ln -fs /usr/sys/include/rpc rpc
65         -ln -fs /usr/sys/include/sys sys
66         -ln -fs /usr/sys/include/ufs ufs
67         -ln -fs /usr/sys/include/sys h
68         -ln -fs /usr/sys/include/vm vm
69         -touch $(KOBJ)/sec_net.h
70
71
72 # Below this line are targets when in the COMMON directory:
73 LIBAFS = libafs.o
74 LIBAFSNONFS = libafs.nonfs.o
75 AFSMOD = afs.mod
76
77 INST_LIBAFS = ${DESTDIR}${afskerneldir}/${LIBAFS}
78 INST_LIBAFSNONFS = ${DESTDIR}${afskerneldir}/${LIBAFSNONFS}
79 INST_AFSMOD = ${DESTDIR}${afskerneldir}/${AFSMOD}
80
81 DEST_LIBAFS = ${DEST}/root.client/bin/${LIBAFS}
82 DEST_LIBAFSNONFS = ${DEST}/root.client/bin/${LIBAFSNONFS}
83 DEST_AFSMOD = ${DEST}/root.client/bin/${AFSMOD}
84
85
86 .PHONY: libafs install_libafs
87 libafs: ${LIBAFSNONFS} ${AFSMOD}
88
89 install_libafs: ${LIBAFSNONFS} ${AFSMOD}
90         ${INSTALL} -d ${DESTDIR}${afskerneldir}
91         $(INSTALL) -m 644 ${LIBAFSNONFS} ${INST_LIBAFSNONFS}
92         $(INSTALL) -m 644 ${AFSMOD} ${INST_AFSMOD}
93
94 dest_libafs: ${LIBAFSNONFS} ${AFSMOD}
95         ${INSTALL} -d ${DEST}/root.client/bin
96         $(INSTALL) -m 644 ${LIBAFSNONFS} ${DEST_LIBAFSNONFS}
97         $(INSTALL) -m 644 ${AFSMOD} ${DEST_AFSMOD}
98
99 ${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS)
100         $(LD) -r -o ${LIBAFS} ${AFSAOBJS} ${AFSNFSOBJS}
101
102 ${LIBAFSNONFS}:  $(AFSAOBJS) $(AFSNONFSOBJS)
103         $(LD) -r -o ${LIBAFSNONFS} ${AFSAOBJS} ${AFSNONFSOBJS}
104
105 ${AFSMOD}: ${LIBAFSNONFS}
106         $(LD) -dc -r -o ${AFSMOD} ${LIBAFSNONFS}