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>
38 # System specific build commands and flags
39 DEFINES= -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT
42 #CC = /opt/SUNWspro/bin/cc
43 KDEFS= -D_KERNEL -DSYSV -dn ${ARCH_DEFS}
44 <sunx86_510 sunx86_511>
47 <sun4x_58 sun4x_59 sun4x_510 sun4x_511>
51 <sunx86_58 sunx86_59 sunx86_510>
53 KDEFS_64 = -xarch=amd64 -xmodel=kernel
57 KDEFS_64 = -m64 -xmodel=kernel
60 CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KDEFS) @SOLARIS_CC_KOPTS@ ${DBUG}
62 <sun4x_58 sunx86_58 sun4x_59 sunx86_59>
63 LDFLAGS=-r -dy -N drv/ip -N drv/udp -N strmod/rpcmod
65 <all -sun4x_58 -sunx86_58 -sun4x_59 -sunx86_59>
66 LDFLAGS=-r -dy -N drv/ip -N drv/udp -N strmod/rpcmod -N fs/ufs
68 # Name of directory to hold object files and libraries.
69 <all -sun4x_510 -sun4x_511 -sunx86_511>
70 KOBJ = MODLOAD32 MODLOAD64
71 <sun4x_510 sun4x_511 sunx86_511>
74 # This tells Makefile.common to use it's single directory build target.
76 COMPDIRS = solaris_compdirs
77 INSTDIRS = solaris_instdirs
78 DESTDIRS = solaris_destdirs
80 include Makefile.common
84 -$(RM) -f h net netinet rpc ufs nfs machine sys inet
85 -ln -fs /usr/include/sys h
86 -ln -fs /usr/include/net net
87 -ln -fs /usr/include/netinet netinet
88 -ln -fs /usr/include/rpc rpc
89 -ln -fs /usr/include/sys sys
90 -ln -fs /usr/include/nfs nfs
91 -ln -fs /usr/include/inet inet
92 -ln -fs /usr/include/ufs ufs
93 for t in ${KOBJ} ; do \
94 echo Making directory: $$t; \
96 $(RM) -f $$t/Makefile.common $$t/Makefile $$t/config ; \
97 ln -fs ../Makefile.common $$t/Makefile.common ; \
98 ln -fs ../Makefile $$t/Makefile ;\
99 ln -fs ../config $$t/config ;\
103 ## This is the target for a Solaris 7. Here we build both the 32 bit and
104 ## the 64 bit libafs in MODLOAD32 and MODLOAD64 directories respectively
106 ${COMPDIRS} ${INSTDIRS} ${DESTDIRS}: setup
107 for t in ${KOBJ} ; do \
108 echo Building directory: $$t ; \
111 ARCH_DEFS="${KDEFS_32}" ; \
114 ARCH_DEFS="${KDEFS_64}" ; \
119 ( cd $$t && $(MAKE) $@_libafs ) || exit $$? ; \
122 solaris_compdirs_libafs: depsrcs libafs
123 solaris_instdirs_libafs: install_libafs
124 solaris_destdirs_libafs: dest_libafs
126 # Below this line are targets when in the COMMON directory:
128 LIBAFSNONFS = libafs.nonfs.o
130 INST_LIBAFSNONFS = ${DESTDIR}${afskerneldir}/libafs${BITS}.nonfs.o
131 INST_LIBAFS = ${DESTDIR}${afskerneldir}/libafs${BITS}.o
133 DEST_LIBAFSNONFS = ${DEST}/root.client/usr/vice/etc/modload/libafs${BITS}.nonfs.o
134 DEST_LIBAFS = ${DEST}/root.client/usr/vice/etc/modload/libafs${BITS}.o
136 # Without this line, gmake tries to build libafs.o
139 libafs: $(LIBAFSNONFS) $(LIBAFS)
141 install_libafs: $(LIBAFS) $(LIBAFSNONFS)
142 ${INSTALL} -d ${DESTDIR}${afskerneldir}
143 ${INSTALL} -m 644 $(LIBAFS) $(INST_LIBAFS)
144 ${INSTALL} -m 644 $(LIBAFSNONFS) $(INST_LIBAFSNONFS)
146 dest_libafs: $(LIBAFS) $(LIBAFSNONFS)
147 ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/modload
148 ${INSTALL} -m 644 $(LIBAFS) $(DEST_LIBAFS)
149 ${INSTALL} -m 644 $(LIBAFSNONFS) $(DEST_LIBAFSNONFS)
151 # See $TOP_SRCDIR/config/cc-wrapper for an explanation/usage of
152 # OPENAFS_CC_WRAPPER_DEBUG_FLAG
154 ${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS)
156 OPENAFS_CC_WRAPPER_DEBUG_FLAG="$(KERN_DBG)" $(LD_WRAPPER) $(LD) $(LDFLAGS) -o $@ $(AFSAOBJS) ${AFSNFSOBJS}
158 ${LIBAFSNONFS}: $(AFSAOBJS) $(AFSNONFSOBJS)
160 OPENAFS_CC_WRAPPER_DEBUG_FLAG="$(KERN_DBG)" $(LD_WRAPPER) $(LD) $(LDFLAGS) -o $@ $(AFSAOBJS) ${AFSNONFSOBJS}