Remove support for Solaris pre-8
[openafs.git] / src / libafs / MakefileProto.SOLARIS.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_crypto.o \
19         osi_gcpags.o \
20         osi_groups.o \
21         osi_inode.o \
22 <sunx86_511 sun4x_511>
23         osi_ioctl.o \
24 <all>
25         osi_file.o \
26         osi_sleep.o \
27         osi_vcache.o \
28         osi_vm.o \
29         osi_vnodeops.o
30
31 AFS_OS_NFSOBJS = \
32         osi_vfsops_nfs.o
33
34 AFS_OS_NONFSOBJS = \
35         osi_vfsops.o
36
37 # System specific build commands and flags
38 DEFINES= -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT
39 #These are redundant
40 #LD = /usr/ccs/bin/ld
41 #LORDER = /usr/ccs/bin/lorder
42 #CC = /opt/SUNWspro/bin/cc
43 KDEFS= -D_KERNEL -DSYSV -dn ${ARCH_DEFS}
44
45 <sun4x_58 sun4x_59 sun4x_510 sun4x_511>
46 KDEFS_32 = -xarch=v8
47 KDEFS_64 = -xarch=v9 
48
49 <sunx86_58 sunx86_59 sunx86_510 sunx86_511>
50 KDEFS_32 = 
51 KDEFS_64 = -xarch=amd64 -xmodel=kernel
52
53 <all>
54 CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG}
55
56 # Name of directory to hold object files and libraries.
57 <all -sun4x_510 sun4x_511>
58 KOBJ = MODLOAD32 MODLOAD64
59 <sun4x_510 sun4x_511>
60 KOBJ = MODLOAD64
61
62 # This tells Makefile.common to use it's single directory build target.
63 <all>
64 COMPDIRS = solaris_compdirs
65 INSTDIRS = solaris_instdirs
66 DESTDIRS = solaris_destdirs
67
68 include Makefile.common
69
70
71 setup:
72         -$(RM) -f  h net netinet rpc ufs nfs  machine sys inet
73         -ln -fs /usr/include/sys h
74         -ln -fs /usr/include/net net
75         -ln -fs /usr/include/netinet netinet
76         -ln -fs /usr/include/rpc rpc
77         -ln -fs /usr/include/sys sys
78         -ln -fs /usr/include/nfs nfs
79         -ln -fs /usr/include/inet inet
80         -ln -fs /usr/include/ufs ufs
81         for t in ${KOBJ} ; do \
82                 echo Making directory: $$t; \
83                 mkdir -p $$t; \
84                 $(RM) -f $$t/Makefile.common $$t/Makefile $$t/config ; \
85                 ln -fs ../Makefile.common $$t/Makefile.common ; \
86                 ln -fs ../Makefile $$t/Makefile ;\
87                 ln -fs ../config $$t/config ;\
88         done
89
90
91 ## This is the target for a Solaris 7. Here we build both the 32 bit and
92 ## the 64 bit libafs in MODLOAD32 and MODLOAD64 directories respectively
93
94 ${COMPDIRS} ${INSTDIRS} ${DESTDIRS}:
95         for t in ${KOBJ} ; do \
96                 echo Building directory: $$t ; \
97                 case $$t in \
98                         MODLOAD32) \
99                          ARCH_DEFS="${KDEFS_32}" ; \
100                          BITS="" ;; \
101                         MODLOAD64) \
102                          ARCH_DEFS="${KDEFS_64}" ; \
103                          BITS="64" ;; \
104                 esac ; \
105                 export ARCH_DEFS ; \
106                 export BITS ; \
107                 cd $$t  ; \
108                 $(MAKE) $@_libafs || exit $$? ; \
109                 cd ../ ;\
110         done
111
112 solaris_compdirs_libafs: depsrcs libafs
113 solaris_instdirs_libafs: install_libafs
114 solaris_destdirs_libafs: dest_libafs
115
116 # Below this line are targets when in the COMMON directory:
117 LIBAFS = libafs.o
118 LIBAFSNONFS = libafs.nonfs.o
119
120 INST_LIBAFSNONFS = ${DESTDIR}${afskerneldir}/libafs${BITS}.nonfs.o
121 INST_LIBAFS = ${DESTDIR}${afskerneldir}/libafs${BITS}.o
122
123 DEST_LIBAFSNONFS = ${DEST}/root.client/usr/vice/etc/modload/libafs${BITS}.nonfs.o
124 DEST_LIBAFS = ${DEST}/root.client/usr/vice/etc/modload/libafs${BITS}.o
125
126 # Without this line, gmake tries to build libafs.o
127 .PHONY: libafs
128
129 libafs: $(LIBAFSNONFS) $(LIBAFS)
130
131 install_libafs: $(LIBAFS) $(LIBAFSNONFS)
132         ${INSTALL} -d ${DESTDIR}${afskerneldir}
133         ${INSTALL} -m 644 $(LIBAFS) $(INST_LIBAFS)
134         ${INSTALL} -m 644 $(LIBAFSNONFS) $(INST_LIBAFSNONFS)
135
136 dest_libafs: $(LIBAFS) $(LIBAFSNONFS)
137         ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/modload
138         ${INSTALL} -m 644 $(LIBAFS) $(DEST_LIBAFS)
139         ${INSTALL} -m 644 $(LIBAFSNONFS) $(DEST_LIBAFSNONFS)
140
141 ${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS)
142         $(RM) -f $@
143         $(LD) -r -o $@ $(AFSAOBJS) ${AFSNFSOBJS}
144
145 ${LIBAFSNONFS}:  $(AFSAOBJS) $(AFSNONFSOBJS)
146         $(RM) -f $@
147         $(LD) -r -o $@  $(AFSAOBJS) ${AFSNONFSOBJS}
148