summaryrefslogtreecommitdiff
path: root/libexec/ld.so/Makefile
blob: 7d4c9a654e9e68b323c5fd11090784f245c3c37e (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
#	$OpenBSD: Makefile,v 1.7 2001/06/08 06:50:34 art Exp $

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

NOMAN=
SRCS=	ldasm.S loader.c library.c resolve.c dlfcn.c dl_printf.c rtld_machine.c
SRCS+=  sod.c strcmp.c strncmp.c strsep.c strtol.c strdup.c strcpy.c
OBJS+=  strchr.o
PROG=	ld.so
MAN=	ld.so.8
BINDIR=/usr/libexec
.if (${MACHINE_ARCH} == "powerpc")
CFLAGS += -fpic -msoft-float
.endif
.if (${MACHINE_ARCH} == "alpha")
CFLAGS += -Werror
CFLAGS += -fpic -mno-fp-regs
LIBCSRCDIR=${.CURDIR}/../../lib/libc
.include "${LIBCSRCDIR}/arch/alpha/Makefile.inc"
.endif
CFLAGS += -I${.CURDIR} -DNO_UNDERSCORE -DVERBOSE_DLINKER \
	-DUSE_CACHE -D__PIC__ -I${.CURDIR}/${MACHINE_ARCH}
#CFLAGS += -g -DDL_PRINTF_DEBUG
INSTALL_STRIP=

.PATH:	${.CURDIR}/${MACHINE_ARCH}

.if (${MACHINE_ARCH} == "powerpc")
#ADDR=-Ttext 21860000 -Tdata 21863000
ADDR=-Tdata 8000
ELF_LDFLAGS=--shared -Bsymbolic ${ADDR} # using GNU ld
.else
ELF_LDFLAGS=--shared -Bsymbolic # using GNU ld
.endif

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

.include <bsd.prog.mk>
.include <bsd.subdir.mk>