blob: 3fdb701695358118d84eab28f11e9588b214cd09 (
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
39
40
41
42
43
44
|
# $OpenBSD: Makefile,v 1.41 2013/02/17 22:06:31 deraadt Exp $
SUBDIR=ldconfig ldd
MAN= ld.so.1
.include <bsd.own.mk>
.if (${ELF_TOOLCHAIN:L} == "yes")
.if defined(NOPIC)
NOPROG=
.else
PROG= ld.so
VPATH=${.CURDIR}/../../lib/libc/string
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 library_subr.c dl_prebind.c
.if (${MACHINE_ARCH} == "i386")
SRCS+= library_mquery.c
.else
SRCS+= library.c
.endif
.include "${.CURDIR}/${MACHINE_CPU}/Makefile.inc"
.PATH: ${.CURDIR}/${MACHINE_CPU}
DEBUG?= -g
CFLAGS += -Wall -Werror
CFLAGS += -I${.CURDIR} -I${.CURDIR}/${MACHINE_CPU} \
-Dstrsep=_dl_strsep
CDIAGFLAGS=
INSTALL_STRIP=
ELF_LDFLAGS+=--shared -Bsymbolic --no-undefined
$(PROG):
$(LD) -x -e _dl_start $(ELF_LDFLAGS) -o $(PROG) $(OBJS) $(LDADD)
.endif
.endif
.include <bsd.prog.mk>
|