summaryrefslogtreecommitdiff
path: root/usr.sbin/afs/lib/libarla/Makefile.lwp.inc
blob: 46f3beb5858118847b39ab46da3b751ad97c00cc (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
36
37
38
### 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:	${AFSSRC}/lwp
CFLAGS	+= -DAFS_BSD_ENV -DFD_SPEED_HACK -I${AFSSRC}/lwp
AINC	+= -DUSING_ASM -DHAVE_PIC

# 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 -sf ${AFSSRC}/lwp/lwp_asm.h lwp.h
lwp.c:
	ln -sf ${AFSSRC}/lwp/lwp_asm.c lwp.c

process.S:
	HOST_CPU=${MACHINE_ARCH}; \
	case "$$HOST_CPU" in \
		arm)   PROCESS_S="process.arm.S" ;; \
		amd64)   PROCESS_S="process.x86_64.S" ;; \
		sparc64) PROCESS_S="process.sparc.S" ;; \
		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 ${AFSSRC}/lwp/$$PROCESS_S process.S

all:	lwp.h