summaryrefslogtreecommitdiff
path: root/libexec/ld.so/Makefile
blob: eb9e4fe185d411d6f69380940c80ef0a453f7995 (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
#	$OpenBSD: Makefile,v 1.21 2003/06/27 01:13:00 deraadt Exp $

SUBDIR=ldconfig ldd
VPATH=${.CURDIR}/../../lib/libc/string:${.CURDIR}/../../sys/lib/libsa

SRCS=	ldasm.S loader.c resolve.c dlfcn.c dl_printf.c rtld_machine.c
SRCS+=	util.c sod.c strsep.c strtol.c dir.c
.if (${MACHINE_ARCH} == "i386")
SRCS+=	library_mquery.c 
.else
SRCS+=	library.c 
.endif

PROG=	ld.so
MAN=	ld.so.1

.include "${.CURDIR}/${MACHINE_ARCH}/Makefile.inc"
.PATH:	${.CURDIR}/${MACHINE_ARCH}

CFLAGS += -Werror -Wall
CFLAGS += -I${.CURDIR} -I${.CURDIR}/${MACHINE_ARCH} \
	-Dstrsep=_dl_strsep -Dstrtol=_dl_strtol
INSTALL_STRIP=

ELF_LDFLAGS+=--shared -Bsymbolic

$(PROG):
	$(LD) -x -e _dl_start $(ELF_LDFLAGS) -o $(PROG) $(OBJS)

.include <bsd.prog.mk>