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
12 # OS specific object files:
27 # System specific build commands and flags
28 DEFINES= -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT
31 #LORDER = /usr/ccs/bin/lorder
32 #CC = /opt/SUNWspro/bin/cc
33 KDEFS= -D_KERNEL -DSYSV -dn ${ARCH_DEFS}
35 <sun4x_57 sun4x_58 sun4x_59 sun4x_510>
39 <sunx86_57 sunx86_58 sunx86_59 sunx86_510>
41 KDEFS_64 = -xarch=amd64 -xmodel=kernel
44 CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG}
46 # Name of directory to hold object files and libraries.
47 <all -sun4x_57 -sun4x_58 -sun4x_59 -sun4x_510 -sunx86_57 -sunx86_58 -sunx86_59 -sunx86_510>
49 <sun4x_57 sun4x_58 sun4x_59 sunx86_57 sunx86_58 sunx86_59 sunx86_510>
50 KOBJ = MODLOAD32 MODLOAD64
54 # This tells Makefile.common to use it's single directory build target.
55 <all -sun4x_57 -sun4x_58 -sun4x_59 -sun4x_510 -sunx86_57 -sunx86_58 -sunx86_59 -sunx86_510>
56 COMPDIRS = single_compdir
57 INSTDIRS = single_instdir
58 DESTDIRS = single_destdir
60 <sun4x_57 sun4x_58 sun4x_59 sun4x_510 sunx86_57 sunx86_58 sunx86_59 sunx86_510>
61 COMPDIRS = solaris_compdirs
62 INSTDIRS = solaris_instdirs
63 DESTDIRS = solaris_destdirs
66 include Makefile.common
70 -$(RM) -f h net netinet rpc ufs nfs machine sys inet
71 -ln -fs /usr/include/sys h
72 -ln -fs /usr/include/net net
73 -ln -fs /usr/include/netinet netinet
74 -ln -fs /usr/include/rpc rpc
75 -ln -fs /usr/include/sys sys
76 -ln -fs /usr/include/nfs nfs
77 -ln -fs /usr/include/inet inet
78 -ln -fs /usr/include/ufs ufs
79 for t in ${KOBJ} ; do \
80 echo Making directory: $$t; \
82 $(RM) -f $$t/Makefile.common $$t/Makefile $$t/config ; \
83 ln -fs ../Makefile.common $$t/Makefile.common ; \
84 ln -fs ../Makefile $$t/Makefile ;\
85 ln -fs ../config $$t/config ;\
89 ## This is the target for a Solaris 7. Here we build both the 32 bit and
90 ## the 64 bit libafs in MODLOAD32 and MODLOAD64 directories respectively
92 <sun4x_57 sun4x_58 sun4x_59 sun4x_510 sunx86_57 sunx86_58 sunx86_59 sunx86_510>
93 ${COMPDIRS} ${INSTDIRS} ${DESTDIRS}:
94 for t in ${KOBJ} ; do \
95 echo Building directory: $$t ; \
98 ARCH_DEFS="${KDEFS_32}" ; \
101 ARCH_DEFS="${KDEFS_64}" ; \
107 $(MAKE) $@_libafs ; \
111 solaris_compdirs_libafs: depsrcs libafs
112 solaris_instdirs_libafs: install_libafs
113 solaris_destdirs_libafs: dest_libafs
117 # Below this line are targets when in the COMMON directory:
119 LIBAFSNONFS = libafs.nonfs.o
121 <all -sun4x_57 -sun4x_58 -sun4x_59>
122 INST_LIBAFS = ${DESTDIR}${afskerneldir}/${LIBAFS}
123 INST_LIBAFSNONFS = ${DESTDIR}${afskerneldir}/${LIBAFSNONFS}
125 DEST_LIBAFS = ${DEST}/root.client/usr/vice/etc/modload/${LIBAFS}
126 DEST_LIBAFSNONFS = ${DEST}/root.client/usr/vice/etc/modload/${LIBAFSNONFS}
128 <sun4x_57 sun4x_58 sun4x_59 sun4x_510 sunx86_57 sunx86_58 sunx86_59 sunx86_510>
129 INST_LIBAFSNONFS = ${DESTDIR}${afskerneldir}/libafs${BITS}.nonfs.o
130 INST_LIBAFS = ${DESTDIR}${afskerneldir}/libafs${BITS}.o
132 DEST_LIBAFSNONFS = ${DEST}/root.client/usr/vice/etc/modload/libafs${BITS}.nonfs.o
133 DEST_LIBAFS = ${DEST}/root.client/usr/vice/etc/modload/libafs${BITS}.o
137 # Without this line, gmake tries to build libafs.o
140 libafs: $(LIBAFSNONFS) $(LIBAFS)
142 install_libafs: $(LIBAFS) $(LIBAFSNONFS)
143 ${INSTALL} -d ${DESTDIR}${afskerneldir}
144 ${INSTALL} -m 644 $(LIBAFS) $(INST_LIBAFS)
145 ${INSTALL} -m 644 $(LIBAFSNONFS) $(INST_LIBAFSNONFS)
147 dest_libafs: $(LIBAFS) $(LIBAFSNONFS)
148 ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/modload
149 ${INSTALL} -m 644 $(LIBAFS) $(DEST_LIBAFS)
150 ${INSTALL} -m 644 $(LIBAFSNONFS) $(DEST_LIBAFSNONFS)
152 ${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS)
154 $(LD) -r -o $@ $(AFSAOBJS) ${AFSNFSOBJS}
156 ${LIBAFSNONFS}: $(AFSAOBJS) $(AFSNONFSOBJS)
158 $(LD) -r -o $@ $(AFSAOBJS) ${AFSNONFSOBJS}