summaryrefslogtreecommitdiff
path: root/usr.sbin/afs/libarla/Makefile.lwp.inc
blob: 6375e367413ad23deb09ea109729ae199544faf6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
### lwp stuff
SRCS		+= lwp.c lock.c iomgr.c timer.c fasttime.c preempt.c q.c
OBJS		+= 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).

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)   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" ;; \
                vax)     PROCESS_S="process.vax.S" ;; \
		*)  echo "Unknown host_cpu, good luck" ;; \
	esac; \
	ln -s ${.CURDIR}/../src/lwp/$$PROCESS_S process.S

process.o: process.S
	${CC} ${CFLAGS} -DHAVE_PIC -c process.S