1996-05-07 23:19:49 +00:00
|
|
|
# $Id: Makefile,v 1.18 1996/01/11 17:49:55 phk Exp $
|
1993-11-03 23:41:59 +00:00
|
|
|
|
|
|
|
PROG= ld.so
|
1994-02-13 20:43:13 +00:00
|
|
|
SRCS= mdprologue.S rtld.c malloc.c shlib.c etc.c md.c
|
1995-08-26 13:17:39 +00:00
|
|
|
MAN1= rtld.1
|
1993-11-03 23:41:59 +00:00
|
|
|
LDDIR?= $(.CURDIR)/..
|
|
|
|
PICFLAG=-fpic
|
1994-02-13 20:43:13 +00:00
|
|
|
CFLAGS+=-I$(LDDIR) -I$(.CURDIR) -I$(LDDIR)/$(MACHINE) $(PICFLAG) -DRTLD
|
|
|
|
LDFLAGS+=-Bshareable -Bsymbolic -assert nosymbolic
|
|
|
|
ASFLAGS+=-k
|
1994-08-28 18:49:06 +00:00
|
|
|
DPADD+= ${LIBC:S/c.a/c_pic.a/} ${LIBC:S/c.a/gcc_pic.a/}
|
1994-03-10 23:19:54 +00:00
|
|
|
LDADD+= -lc_pic -lgcc_pic
|
1993-11-03 23:41:59 +00:00
|
|
|
BINDIR= /usr/libexec
|
1995-08-26 13:17:39 +00:00
|
|
|
MLINKS= rtld.1 ld.so.1
|
1993-11-03 23:41:59 +00:00
|
|
|
|
1994-02-13 20:43:13 +00:00
|
|
|
.PATH: $(LDDIR) $(LDDIR)/$(MACHINE)
|
|
|
|
|
1994-08-28 18:49:06 +00:00
|
|
|
$(PROG): ${OBJS} ${DPADD}
|
1995-03-04 17:49:20 +00:00
|
|
|
$(LD) -o $(PROG) $(LDFLAGS) $(OBJS) $(LDADD)
|
1993-11-03 23:41:59 +00:00
|
|
|
|
1996-01-11 03:45:55 +00:00
|
|
|
realinstall:
|
|
|
|
${INSTALL} ${COPY} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
|
|
|
|
${INSTALLFLAGS} ${PROG} ${DESTDIR}${BINDIR}/${PROG}.new
|
|
|
|
test -f ${DESTDIR}${BINDIR}/${PROG}.old && \
|
|
|
|
chflags noschg ${DESTDIR}${BINDIR}/${PROG}.old || \
|
|
|
|
:
|
1996-01-11 17:27:16 +00:00
|
|
|
-chflags noschg ${DESTDIR}${BINDIR}/${PROG}
|
|
|
|
-ln -f ${DESTDIR}${BINDIR}/${PROG} ${DESTDIR}${BINDIR}/${PROG}.old
|
1996-05-07 23:19:49 +00:00
|
|
|
mv -f ${DESTDIR}${BINDIR}/${PROG}.new ${DESTDIR}${BINDIR}/${PROG}
|
1996-01-11 03:45:55 +00:00
|
|
|
chflags schg ${DESTDIR}${BINDIR}/${PROG}
|
1996-05-07 23:19:49 +00:00
|
|
|
-rm -f ${DESTDIR}${BINDIR}/${PROG}.old
|
1996-01-11 03:45:55 +00:00
|
|
|
|
1993-11-03 23:41:59 +00:00
|
|
|
.include <bsd.prog.mk>
|