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
8 # MakefileProto for Linux i386 systems
12 include ../config/Makefile.${SYS_NAME}
14 # OS specific object files:
35 # System specific build commands and flags
39 <i386_linux22 i386_linux24>
40 CCFLAGS = -O2 -fomit-frame-pointer \
41 -fno-strength-reduce -pipe -m486 -malign-loops=2 -malign-jumps=2 \
43 DEFINES = -D__KERNEL__ -DCPU=586 -DKERNEL -D_KERNEL -DMODULE ${SMP_DEF}
44 <s390_linux22 s390_linux24>
45 CCFLAGS = -O2 -fomit-frame-pointer -fno-strength-reduce \
46 -fno-strict-aliasing -fsigned-char -pipe \
48 DEFINES = -D__KERNEL__ -D__s390__ -DKERNEL -D_KERNEL -DMODULE ${SMP_DEF}
49 <sparc_linux22 sparc_linux24>
50 LD = ld -m elf32_sparc
51 CCFLAGS = -O2 -fomit-frame-pointer \
52 -fno-strength-reduce -pipe -mcpu=v8 -mno-fpu -fcall-used-g5 -fcall-used-g7
53 DEFINES = -D__KERNEL__ -DCPU=sparc -DKERNEL -D_KERNEL -DMODULE ${SMP_DEF}
54 <sparc64_linux22 sparc64_linux24>
55 CC = sparc64-linux-gcc
56 LD = ld -m elf64_sparc
57 CCFLAGS = -O2 -fomit-frame-pointer \
58 -fno-strength-reduce -pipe -mcpu=ultrasparc -m64 -mno-fpu -mcmodel=medlow -ffixed-g4 -fcall-used-g5 -fcall-used-g7 -Wno-sign-compare
59 DEFINES = -D__KERNEL__ -DCPU=sparc64 -DKERNEL -D_KERNEL -DMODULE ${SMP_DEF}
60 <ppc_linux22 ppc_linux24>
61 CCFLAGS = -O2 -fomit-frame-pointer -fno-strength-reduce \
62 -fno-strict-aliasing -fsigned-char -msoft-float -pipe \
63 -fno-builtin -ffixed-r2
64 DEFINES = -D__KERNEL__ -D__powerpc__ -DKERNEL -D_KERNEL -DMODULE ${SMP_DEF}
68 CFLAGS = $(CCFLAGS) $(DEFINES) $(INCLUDES)
70 # Name of directory to hold object files and libraries.
74 # COMPDIRS is called in Makefile.common to do the actual builds.
75 COMPDIRS=linux_compdirs
78 include Makefile.common
81 -rm -f h net netinet sys rpc
83 for v in ${LINUX_VERS} ; do \
84 for m in ${MPS} ; do \
85 KDIR=$(KOBJ)-$$v-$$m; \
87 ln -fs ../Makefile $${KDIR}/Makefile ; \
88 ln -fs ../Makefile.common $${KDIR}/Makefile.common; \
92 # Compile SP and MP clients as requested
94 LINUX_INCDIR=include/linux
97 for v in ${LINUX_VERS} ; do \
98 IDIR=${LINUX_SRCDIR}$$v/${LINUX_INCDIR}; \
102 ln -s $${IDIR} linux; \
104 ln -s $${IDIR} net; \
106 ln -s $${IDIR} netinet; \
108 ln -s $${IDIR} sys; \
110 <i386_linux22 i386_linux24>
111 ln -s ${LINUX_SRCDIR}$$v/include/asm-i386 asm ; \
112 <ppc_linux22 ppc_linux24>
113 ln -s ${LINUX_SRCDIR}$$v/include/asm-ppc asm ; \
114 <sparc_linux22 sparc_linux24>
115 ln -s ${LINUX_SRCDIR}$$v/include/asm-sparc asm ; \
116 <sparc64_linux22 sparc64_linux24>
117 ln -s ${LINUX_SRCDIR}$$v/include/asm-sparc64 asm ; \
119 for m in ${MPS} ; do \
120 KDIR=${KOBJ}-$$v-$$m ; \
121 echo Building in directory: $${KDIR} ; \
122 if [ "$$m" = "MP" ] ; then \
123 SMP_DEF="-DAFS_SMP" ; \
130 $(MAKE) DESTDIR=${DESTDIR} SMP_DEF=$${SMP_DEF} $${TARG} CLIENT=$$v || exit $$?; \
136 # Below this line are targets when in the COMMON directory:
137 # For Linux there is no kernel NFS server.
138 LIBAFS = libafs-${CLIENT}.o
139 LIBAFS_MP = libafs-${CLIENT}.mp.o
141 DEST_LIBAFS = ${DESTDIR}/root.client/usr/vice/etc/modload/${LIBAFS}
142 DEST_LIBAFS_MP = ${DESTDIR}/root.client/usr/vice/etc/modload/${LIBAFS_MP}
145 libafs: $(DEST_LIBAFS)
146 echo SP Build Complete
148 libafs.mp: $(DEST_LIBAFS_MP)
149 echo MP Build Complete
151 $(DEST_LIBAFS): $(LIBAFS)
154 $(DEST_LIBAFS_MP): $(LIBAFS_MP)
157 ${LIBAFS}: $(AFSAOBJS) $(AFSNONFSOBJS)
159 $(LD) -r -o $@ $(AFSAOBJS) $(AFSNONFSOBJS)
161 ${LIBAFS_MP}: $(AFSAOBJS) $(AFSNONFSOBJS)
163 $(LD) -r -o $@ $(AFSAOBJS) $(AFSNONFSOBJS)
166 # Linux specific objects
167 osi_alloc.o: $(AFS)/osi_alloc.c
169 osi_cred.o: $(AFS)/osi_cred.c
171 osi_groups.o: $(AFS)/osi_groups.c
173 osi_file.o: $(AFS)/osi_file.c
175 osi_inode.o: $(AFS)/osi_inode.c
177 osi_misc.o: $(AFS)/osi_misc.c
179 osi_module.o: $(AFS)/osi_module.c
181 osi_sleep.o: $(AFS)/osi_sleep.c
183 osi_vfsops.o: $(AFS)/osi_vfsops.c
185 osi_vm.o: $(AFS)/osi_vm.c
187 osi_vnodeops.o: $(AFS)/osi_vnodeops.c
191 xdr_array.o: $(RX)/xdr_array.c