1 # Copyright 2000, International Business Machines Corporation and others.
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
9 include @TOP_OBJDIR@/src/config/Makefile.config
11 INSTALL_DATA = @INSTALL_DATA@
12 INSTALL_PROGRAM = @INSTALL_PROGRAM@
13 INSTALL_SCRIPT = @INSTALL_SCRIPT@
16 # OS specific object files:
22 <sunx86_511 sun4x_511>
37 # System specific build commands and flags
38 DEFINES= -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT
41 #LORDER = /usr/ccs/bin/lorder
42 #CC = /opt/SUNWspro/bin/cc
43 KDEFS= -D_KERNEL -DSYSV -dn ${ARCH_DEFS}
45 <sun4x_57 sun4x_58 sun4x_59 sun4x_510 sun4x_511>
49 <sunx86_57 sunx86_58 sunx86_59 sunx86_510 sunx86_511>
51 KDEFS_64 = -xarch=amd64 -xmodel=kernel
54 CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG}
56 # Name of directory to hold object files and libraries.
57 <all -sun4x_57 -sun4x_58 -sun4x_59 -sun4x_510 -sun4x_511 -sunx86_57 -sunx86_58 -sunx86_59 -sunx86_510 -sunx86_511>
59 <sun4x_57 sun4x_58 sun4x_59 sunx86_57 sunx86_58 sunx86_59 sunx86_510 sunx86_511>
60 KOBJ = MODLOAD32 MODLOAD64
64 # This tells Makefile.common to use it's single directory build target.
65 <all -sun4x_57 -sun4x_58 -sun4x_59 -sun4x_510 -sun4x_511 -sunx86_57 -sunx86_58 -sunx86_59 -sunx86_510 -sunx86_511>
66 COMPDIRS = single_compdir
67 INSTDIRS = single_instdir
68 DESTDIRS = single_destdir
70 <sun4x_57 sun4x_58 sun4x_59 sun4x_510 sun4x_511 sunx86_57 sunx86_58 sunx86_59 sunx86_510 sunx86_511>
71 COMPDIRS = solaris_compdirs
72 INSTDIRS = solaris_instdirs
73 DESTDIRS = solaris_destdirs
76 include Makefile.common
80 -$(RM) -f h net netinet rpc ufs nfs machine sys inet
81 -ln -fs /usr/include/sys h
82 -ln -fs /usr/include/net net
83 -ln -fs /usr/include/netinet netinet
84 -ln -fs /usr/include/rpc rpc
85 -ln -fs /usr/include/sys sys
86 -ln -fs /usr/include/nfs nfs
87 -ln -fs /usr/include/inet inet
88 -ln -fs /usr/include/ufs ufs
89 for t in ${KOBJ} ; do \
90 echo Making directory: $$t; \
92 $(RM) -f $$t/Makefile.common $$t/Makefile $$t/config ; \
93 ln -fs ../Makefile.common $$t/Makefile.common ; \
94 ln -fs ../Makefile $$t/Makefile ;\
95 ln -fs ../config $$t/config ;\
99 ## This is the target for a Solaris 7. Here we build both the 32 bit and
100 ## the 64 bit libafs in MODLOAD32 and MODLOAD64 directories respectively
102 <sun4x_57 sun4x_58 sun4x_59 sun4x_510 sun4x_511 sunx86_57 sunx86_58 sunx86_59 sunx86_510 sunx86_511>
103 ${COMPDIRS} ${INSTDIRS} ${DESTDIRS}:
104 for t in ${KOBJ} ; do \
105 echo Building directory: $$t ; \
108 ARCH_DEFS="${KDEFS_32}" ; \
111 ARCH_DEFS="${KDEFS_64}" ; \
117 $(MAKE) $@_libafs || exit $$? ; \
121 solaris_compdirs_libafs: depsrcs libafs
122 solaris_instdirs_libafs: install_libafs
123 solaris_destdirs_libafs: dest_libafs
127 # Below this line are targets when in the COMMON directory:
129 LIBAFSNONFS = libafs.nonfs.o
131 <all -sun4x_57 -sun4x_58 -sun4x_59>
132 INST_LIBAFS = ${DESTDIR}${afskerneldir}/${LIBAFS}
133 INST_LIBAFSNONFS = ${DESTDIR}${afskerneldir}/${LIBAFSNONFS}
135 DEST_LIBAFS = ${DEST}/root.client/usr/vice/etc/modload/${LIBAFS}
136 DEST_LIBAFSNONFS = ${DEST}/root.client/usr/vice/etc/modload/${LIBAFSNONFS}
138 <sun4x_57 sun4x_58 sun4x_59 sun4x_510 sun4x_511 sunx86_57 sunx86_58 sunx86_59 sunx86_510 sunx86_511>
139 INST_LIBAFSNONFS = ${DESTDIR}${afskerneldir}/libafs${BITS}.nonfs.o
140 INST_LIBAFS = ${DESTDIR}${afskerneldir}/libafs${BITS}.o
142 DEST_LIBAFSNONFS = ${DEST}/root.client/usr/vice/etc/modload/libafs${BITS}.nonfs.o
143 DEST_LIBAFS = ${DEST}/root.client/usr/vice/etc/modload/libafs${BITS}.o
147 # Without this line, gmake tries to build libafs.o
150 libafs: $(LIBAFSNONFS) $(LIBAFS)
152 install_libafs: $(LIBAFS) $(LIBAFSNONFS)
153 ${INSTALL} -d ${DESTDIR}${afskerneldir}
154 ${INSTALL} -m 644 $(LIBAFS) $(INST_LIBAFS)
155 ${INSTALL} -m 644 $(LIBAFSNONFS) $(INST_LIBAFSNONFS)
157 dest_libafs: $(LIBAFS) $(LIBAFSNONFS)
158 ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/modload
159 ${INSTALL} -m 644 $(LIBAFS) $(DEST_LIBAFS)
160 ${INSTALL} -m 644 $(LIBAFSNONFS) $(DEST_LIBAFSNONFS)
162 ${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS)
164 $(LD) -r -o $@ $(AFSAOBJS) ${AFSNFSOBJS}
166 ${LIBAFSNONFS}: $(AFSAOBJS) $(AFSNONFSOBJS)
168 $(LD) -r -o $@ $(AFSAOBJS) ${AFSNONFSOBJS}