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:
33 # System specific build commands and flags
34 DEFINES= -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT
37 #LORDER = /usr/ccs/bin/lorder
38 #CC = /opt/SUNWspro/bin/cc
39 KDEFS= -D_KERNEL -DSYSV -dn ${ARCH_DEFS}
41 <sun4x_57 sun4x_58 sun4x_59 sun4x_510 sun4x_511>
45 <sunx86_57 sunx86_58 sunx86_59 sunx86_510 sunx86_511>
47 KDEFS_64 = -xarch=amd64 -xmodel=kernel
50 CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG}
52 # Name of directory to hold object files and libraries.
53 <all -sun4x_57 -sun4x_58 -sun4x_59 -sun4x_510 -sun4x_511 -sunx86_57 -sunx86_58 -sunx86_59 -sunx86_510 -sunx86_511>
55 <sun4x_57 sun4x_58 sun4x_59 sunx86_57 sunx86_58 sunx86_59 sunx86_510 sunx86_511>
56 KOBJ = MODLOAD32 MODLOAD64
60 # This tells Makefile.common to use it's single directory build target.
61 <all -sun4x_57 -sun4x_58 -sun4x_59 -sun4x_510 -sun4x_511 -sunx86_57 -sunx86_58 -sunx86_59 -sunx86_510 -sunx86_511>
62 COMPDIRS = single_compdir
63 INSTDIRS = single_instdir
64 DESTDIRS = single_destdir
66 <sun4x_57 sun4x_58 sun4x_59 sun4x_510 sun4x_511 sunx86_57 sunx86_58 sunx86_59 sunx86_510 sunx86_511>
67 COMPDIRS = solaris_compdirs
68 INSTDIRS = solaris_instdirs
69 DESTDIRS = solaris_destdirs
72 include Makefile.common
76 -$(RM) -f h net netinet rpc ufs nfs machine sys inet
77 -ln -fs /usr/include/sys h
78 -ln -fs /usr/include/net net
79 -ln -fs /usr/include/netinet netinet
80 -ln -fs /usr/include/rpc rpc
81 -ln -fs /usr/include/sys sys
82 -ln -fs /usr/include/nfs nfs
83 -ln -fs /usr/include/inet inet
84 -ln -fs /usr/include/ufs ufs
85 for t in ${KOBJ} ; do \
86 echo Making directory: $$t; \
88 $(RM) -f $$t/Makefile.common $$t/Makefile $$t/config ; \
89 ln -fs ../Makefile.common $$t/Makefile.common ; \
90 ln -fs ../Makefile $$t/Makefile ;\
91 ln -fs ../config $$t/config ;\
95 ## This is the target for a Solaris 7. Here we build both the 32 bit and
96 ## the 64 bit libafs in MODLOAD32 and MODLOAD64 directories respectively
98 <sun4x_57 sun4x_58 sun4x_59 sun4x_510 sun4x_511 sunx86_57 sunx86_58 sunx86_59 sunx86_510 sunx86_511>
99 ${COMPDIRS} ${INSTDIRS} ${DESTDIRS}:
100 for t in ${KOBJ} ; do \
101 echo Building directory: $$t ; \
104 ARCH_DEFS="${KDEFS_32}" ; \
107 ARCH_DEFS="${KDEFS_64}" ; \
113 $(MAKE) $@_libafs ; \
117 solaris_compdirs_libafs: depsrcs libafs
118 solaris_instdirs_libafs: install_libafs
119 solaris_destdirs_libafs: dest_libafs
123 # Below this line are targets when in the COMMON directory:
125 LIBAFSNONFS = libafs.nonfs.o
127 <all -sun4x_57 -sun4x_58 -sun4x_59>
128 INST_LIBAFS = ${DESTDIR}${afskerneldir}/${LIBAFS}
129 INST_LIBAFSNONFS = ${DESTDIR}${afskerneldir}/${LIBAFSNONFS}
131 DEST_LIBAFS = ${DEST}/root.client/usr/vice/etc/modload/${LIBAFS}
132 DEST_LIBAFSNONFS = ${DEST}/root.client/usr/vice/etc/modload/${LIBAFSNONFS}
134 <sun4x_57 sun4x_58 sun4x_59 sun4x_510 sun4x_511 sunx86_57 sunx86_58 sunx86_59 sunx86_510 sunx86_511>
135 INST_LIBAFSNONFS = ${DESTDIR}${afskerneldir}/libafs${BITS}.nonfs.o
136 INST_LIBAFS = ${DESTDIR}${afskerneldir}/libafs${BITS}.o
138 DEST_LIBAFSNONFS = ${DEST}/root.client/usr/vice/etc/modload/libafs${BITS}.nonfs.o
139 DEST_LIBAFS = ${DEST}/root.client/usr/vice/etc/modload/libafs${BITS}.o
143 # Without this line, gmake tries to build libafs.o
146 libafs: $(LIBAFSNONFS) $(LIBAFS)
148 install_libafs: $(LIBAFS) $(LIBAFSNONFS)
149 ${INSTALL} -d ${DESTDIR}${afskerneldir}
150 ${INSTALL} -m 644 $(LIBAFS) $(INST_LIBAFS)
151 ${INSTALL} -m 644 $(LIBAFSNONFS) $(INST_LIBAFSNONFS)
153 dest_libafs: $(LIBAFS) $(LIBAFSNONFS)
154 ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/modload
155 ${INSTALL} -m 644 $(LIBAFS) $(DEST_LIBAFS)
156 ${INSTALL} -m 644 $(LIBAFSNONFS) $(DEST_LIBAFSNONFS)
158 ${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS)
160 $(LD) -r -o $@ $(AFSAOBJS) ${AFSNFSOBJS}
162 ${LIBAFSNONFS}: $(AFSAOBJS) $(AFSNONFSOBJS)
164 $(LD) -r -o $@ $(AFSAOBJS) ${AFSNONFSOBJS}