1#	$NetBSD: Makefile,v 1.47 2011/08/11 21:23:09 jmcneill Exp $
2
3LIB=		compat
4NOPIC=		# defined
5LLIBS=		# defined
6
7CPPFLAGS=	${COMPATCPPFLAGS} ${SKIP_AUTODEP::=}
8
9.PATH.c: ${COMPATDIR}
10
11# Common compatibility code, used by all emulations
12SRCS=	compat_exec.c compat_util.c
13
14# Compatibility code for 4.3BSD
15SRCS+=	kern_exit_43.c kern_info_43.c kern_resource_43.c kern_sig_43.c \
16	tty_43.c uipc_syscalls_43.c vfs_syscalls_43.c vm_43.c if_43.c
17
18# Compatibility code for NetBSD 0.9
19SRCS+=	kern_info_09.c
20
21# Compatibility code for NetBSD 1.2
22SRCS+=	kern_xxx_12.c vfs_syscalls_12.c vm_12.c
23
24# Compatibility code for NetBSD 1.3
25SRCS+=	kern_sig_13.c
26
27# Compatibility code for NetBSD 1.6
28SRCS+=	kern_sig_16.c
29
30# Compatibility code for NetBSD 1.4
31SRCS+=	sysv_msg_14.c sysv_shm_14.c sysv_sem_14.c rtsock_14.c
32
33# Compatibility code for NetBSD 2.0
34SRCS+=	vfs_syscalls_20.c
35
36# Compatibility code for NetBSD 3.0
37SRCS+=	kern_time_30.c vfs_syscalls_30.c uipc_syscalls_30.c
38
39# Compatibility code for NetBSD 4.0
40SRCS+=	vfs_syscalls_40.c uipc_syscalls_40.c
41
42# Compatibility code for NetBSD 5.0
43SRCS+=	kern_time_50.c kern_select_50.c rndpseudo_50.c rtsock_50.c \
44	sysv_ipc_50.c sysv_msg_50.c sysv_sem_50.c sysv_shm_50.c \
45	vfs_syscalls_50.c  uipc_syscalls_50.c
46
47# really, all machines where sizeof(int) != sizeof(long) (LP64)
48.if (${MACHINE_ARCH} != "alpha" && ${MACHINE_ARCH} != "sparc64" \
49  && ${MACHINE_ARCH} != "x86_64")
50SRCS+=	kern_ipc_10.c
51.endif
52
53# only needed during build
54libinstall::
55
56.include <bsd.own.mk>
57.undef DESTDIR
58.include <bsd.lib.mk>
59
60lib${LIB}.o:: ${OBJS}
61	@echo building standard ${LIB} library
62	@rm -f lib${LIB}.o
63	@${LD} -r -o lib${LIB}.o `NM=${NM} ${LORDER} ${OBJS} | ${TSORT}`
64
65lib${LIB}.po:: ${POBJS}
66	@echo building profiled ${LIB} library
67	@rm -f lib${LIB}.po
68	@${LD} -r -o lib${LIB}.po `NM=${NM} ${LORDER} ${POBJS} | ${TSORT}`
69
70showsources: ${SRCS}
71	@echo ${.ALLSRC}
72