backport to buster
[hcoop/debian/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 INSTALL = @INSTALL@
11 INSTALL_DATA = @INSTALL_DATA@
12 INSTALL_PROGRAM = @INSTALL_PROGRAM@
13 INSTALL_SCRIPT = @INSTALL_SCRIPT@
14
15
16 # OS specific object files:
17 AFS_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
28 AFS_OS_NFSOBJS = \
29 osi_vfsops_nfs.o
30
31 AFS_OS_NONFSOBJS = \
32 osi_vfsops.o
33
34 HEADER_RT = @HEADER_RT@
35
36 # System specific build commands and flags
37 KDEFS=-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
42 DBUG = -O2 -g3
43 DEFINES= -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT
44 OPTF=${OPT}
45 OPTF2=${OPT2}
46 CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG}
47
48
49 # Name of directory to hold object files and libraries.
50 KOBJ = STATIC
51
52 # This tells Makefile.common to use it's single directory build target.
53 COMPDIRS = single_compdir
54 INSTDIRS = single_instdir
55 DESTDIRS = single_destdir
56
57 include Makefile.common
58
59 setup:
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:
79 LIBAFS = libafs.o
80 LIBAFSNONFS = libafs.nonfs.o
81 AFSMOD = afs.mod
82
83 INST_LIBAFS = ${DESTDIR}${afskerneldir}/${LIBAFS}
84 INST_LIBAFSNONFS = ${DESTDIR}${afskerneldir}/${LIBAFSNONFS}
85 INST_AFSMOD = ${DESTDIR}${afskerneldir}/${AFSMOD}
86
87 DEST_LIBAFS = ${DEST}/root.client/bin/${LIBAFS}
88 DEST_LIBAFSNONFS = ${DEST}/root.client/bin/${LIBAFSNONFS}
89 DEST_AFSMOD = ${DEST}/root.client/bin/${AFSMOD}
90
91
92 .PHONY: libafs install_libafs
93 libafs: ${LIBAFSNONFS} ${AFSMOD}
94
95 install_libafs: ${LIBAFSNONFS} ${AFSMOD}
96 ${INSTALL} -d ${DESTDIR}${afskerneldir}
97 $(INSTALL) -m 644 ${LIBAFSNONFS} ${INST_LIBAFSNONFS}
98 $(INSTALL) -m 644 ${AFSMOD} ${INST_AFSMOD}
99
100 dest_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}