diff options
Diffstat (limited to 'usr.sbin/afs/libarla/Makefile.lwp.inc')
-rw-r--r-- | usr.sbin/afs/libarla/Makefile.lwp.inc | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/usr.sbin/afs/libarla/Makefile.lwp.inc b/usr.sbin/afs/libarla/Makefile.lwp.inc index 02e886fac1c..ca1d0fa5e37 100644 --- a/usr.sbin/afs/libarla/Makefile.lwp.inc +++ b/usr.sbin/afs/libarla/Makefile.lwp.inc @@ -1,23 +1,34 @@ ### lwp stuff SRCS += lwp.c lock.c iomgr.c timer.c fasttime.c preempt.c q.c OBJS += process.o -CLEANFILES += process.o +CLEANFILES += process.S process.o lwp.c lwp.h .PATH: ${.CURDIR}/../src/lwp CFLAGS += -DAFS_BSD_ENV -DFD_SPEED_HACK -I${.CURDIR}/../src/lwp +# We use the handcoded assembler stuff for context switching, not +# pthreads (because pthreads do not work for now). -process.o: process.S +beforedepend: lwp.c lwp.h + +lwp.h: + ln -s ${.CURDIR}/../src/lwp/lwp_asm.h lwp.h +lwp.c: + ln -s ${.CURDIR}/../src/lwp/lwp_asm.c lwp.c + +process.S: HOST_CPU=${MACHINE_ARCH}; \ case "$$HOST_CPU" in \ - sparc) CPUDEF="-Dsparc" ;; \ - i*86*) CPUDEF="-DAFS_386i_ENV" ;; \ - m68k) CPUDEF="-Dmc68000" ;; \ - mips) CPUDEF="-Dmips" ;; \ - alpha) CPUDEF="-Dalpha" ;; \ - hppa*) CPUDEF="" ;; \ - powerpc) CPUDEF="-D__powerpc__" ;; \ - rs6000) CPUDEF="-DRIOS" ;; \ + sparc) PROCESS_S="process.sparc.S" ;; \ + i*86*) PROCESS_S="process.i386.S" ;; \ + m68k) PROCESS_S="process.m68k.S" ;; \ + mips*) PROCESS_S="process.mips.S" ;; \ + alpha*) PROCESS_S="process.alpha.S" ;; \ + hppa*) PROCESS_S="process.hpux.S" ;; \ + powerpc) PROCESS_S="process.ppc.S" ;; \ + rs6000) PROCESS_S="process.rios.S" ;; \ *) echo "Unknown host_cpu, good luck" ;; \ esac; \ - OSDEF="-DAFS_NETBSD_ENV"; \ - ${CC} ${CFLAGS} $$CPUDEF $$OSDEF -c ${.CURDIR}/../src/lwp/process.S + ln -s ${.CURDIR}/../src/lwp/$$PROCESS_S process.S + +process.o: process.S + ${CC} ${CFLAGS} -DHAVE_PIC -c process.S |