libafs-make-subtree-during-build-for-later-use-20010829
[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 # MakefileProto for Digital Unix systems
9 #
10 DESTDIR=@DESTDIR@
11 SRCDIR=@SRCDIR@
12 TOP_SRCDIR=@TOP_SRCDIR@
13 SYS_NAME=@AFS_SYSNAME@
14
15 include config/Makefile.${SYS_NAME}
16
17
18 # OS specific object files:
19 AFS_OS_OBJS = \
20         osi_groups.o \
21         osi_file.o \
22         osi_inode.o \
23         osi_misc.o \
24         osi_sleep.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_SRCDIR}/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
56 include Makefile.common
57
58 setup:
59         -mkdir $(KOBJ)
60         -rm $(KOBJ)/Makefile $(KOBJ)/Makefile.common $(KOBJ)/config
61         ln -s ../Makefile $(KOBJ)/Makefile
62         ln -s ../Makefile.common $(KOBJ)/Makefile.common
63         ln -s ../config $(KOBJ)/config
64         -rm -f  h net netinet rpc ufs nfs  machine sys vm
65         -ln -s /usr/sys/include/net net
66         -ln -s /usr/sys/include/machine machine
67         -ln -s /usr/sys/include/netinet netinet
68         -ln -s /usr/sys/include/nfs nfs
69         -ln -s /usr/sys/include/rpc rpc
70         -ln -s /usr/sys/include/sys sys
71         -ln -s /usr/sys/include/ufs ufs
72         -ln -s /usr/sys/include/sys h
73         -ln -s /usr/sys/include/vm vm
74         -touch $(KOBJ)/sec_net.h
75
76
77 # Below this line are targets when in the COMMON directory:
78 LIBAFS = libafs.o
79 LIBAFSNONFS = libafs.nonfs.o
80 AFSMOD = afs.mod
81
82 DEST_LIBAFS = ${DESTDIR}/root.client/bin/${LIBAFS}
83 DEST_LIBAFSNONFS = ${DESTDIR}/root.client/bin/${LIBAFSNONFS}
84 DEST_AFSMOD = ${DESTDIR}/root.client/bin/${AFSMOD}
85
86
87 # libafs:       ${DEST_LIBAFS} ${DEST_LIBAFSNONFS} ${DEST_AFSMOD}
88
89 .PHONY: libafs install_libafs
90 libafs: ${LIBAFSNONFS} ${AFSMOD}
91 install_libafs: ${DEST_LIBAFSNONFS} ${DEST_AFSMOD}
92
93
94 ${DEST_LIBAFS}: ${LIBAFS}
95         $(INSTALL) -f $? $@
96
97 ${DEST_LIBAFSNONFS}: ${LIBAFSNONFS}
98         $(INSTALL) -f $? $@
99
100 ${DEST_AFSMOD}: ${AFSMOD}
101         $(INSTALL) -f $? $@
102
103 ${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS)
104         $(LD) -r -o ${LIBAFS} ${AFSAOBJS} ${AFSNFSOBJS}
105
106 ${LIBAFSNONFS}:  $(AFSAOBJS) $(AFSNONFSOBJS)
107         $(LD) -r -o ${LIBAFSNONFS} ${AFSAOBJS} ${AFSNONFSOBJS}
108
109 ${AFSMOD}: ${LIBAFSNONFS}
110         $(LD) -dc -r -o ${AFSMOD} ${LIBAFSNONFS}
111
112 # Object build rules:
113 osi_groups.o: $(AFS)/osi_groups.c
114         $(CRULE1)
115 osi_file.o: $(AFS)/osi_file.c
116         $(CRULE1)
117 osi_inode.o: $(AFS)/osi_inode.c
118         $(CRULE1)
119 osi_misc.o: $(AFS)/osi_misc.c
120         $(CRULE1)
121 osi_sleep.o: $(AFS)/osi_sleep.c
122         $(CRULE1)
123 osi_vfsops_nfs.o: $(AFS)/osi_vfsops.c
124         $(CRULE1) -o osi_vfsops_nfs.o
125 osi_vfsops.o: $(AFS)/osi_vfsops.c
126         $(CRULE1) -DAFS_NONFSTRANS
127 osi_vm.o: $(AFS)/osi_vm.c
128         $(CRULE1)
129 osi_vnodeops.o: $(AFS)/osi_vnodeops.c
130         $(CRULE1)