version 1.166, 2003/05/18 07:36:23 |
version 1.167, 2003/05/31 20:33:16 |
|
|
|
|
.include <bsd.init.mk> |
.include <bsd.init.mk> |
.include <bsd.shlib.mk> |
.include <bsd.shlib.mk> |
|
.include <bsd.gcc.mk> |
|
|
##### Basic targets |
##### Basic targets |
.PHONY: cleanextra cleanobjs cleanprog proginstall scriptsinstall |
.PHONY: cleanextra cleanobjs cleanprog proginstall scriptsinstall |
Line 22 CFLAGS+= -mcmodel=medlow |
|
Line 23 CFLAGS+= -mcmodel=medlow |
|
# ELF platforms depend on crti.o, crtbegin.o, crtend.o, and crtn.o |
# ELF platforms depend on crti.o, crtbegin.o, crtend.o, and crtn.o |
.if ${OBJECT_FMT} == "ELF" |
.if ${OBJECT_FMT} == "ELF" |
.ifndef LIBCRTBEGIN |
.ifndef LIBCRTBEGIN |
LIBCRTBEGIN= ${DESTDIR}/usr/lib/crti.o ${DESTDIR}/usr/lib/crtbegin.o |
LIBCRTBEGIN= ${DESTDIR}/usr/lib/crti.o ${_GCC_CRTBEGIN} |
.MADE: ${LIBCRTBEGIN} |
.MADE: ${LIBCRTBEGIN} |
.endif |
.endif |
.ifndef LIBCRTEND |
.ifndef LIBCRTEND |
.if ${MACHINE_ARCH} == "powerpc" && defined(HAVE_GCC3) |
LIBCRTEND= ${_GCC_CRTEND} ${DESTDIR}/usr/lib/crtn.o |
LIBCRTEND= ${DESTDIR}/usr/lib/crtsavres.o \ |
|
${DESTDIR}/usr/lib/crtend.o ${DESTDIR}/usr/lib/crtn.o |
|
.else |
|
LIBCRTEND= ${DESTDIR}/usr/lib/crtend.o ${DESTDIR}/usr/lib/crtn.o |
|
.endif |
|
.MADE: ${LIBCRTEND} |
.MADE: ${LIBCRTEND} |
.endif |
.endif |
_SHLINKER= ${SHLINKDIR}/ld.elf_so |
_SHLINKER= ${SHLINKDIR}/ld.elf_so |
|
|
|
|
${PROG}: .gdbinit ${LIBCRT0} ${DPSRCS} ${OBJS} ${LIBC} ${LIBCRTBEGIN} ${LIBCRTEND} ${DPADD} |
${PROG}: .gdbinit ${LIBCRT0} ${DPSRCS} ${OBJS} ${LIBC} ${LIBCRTBEGIN} ${LIBCRTEND} ${DPADD} |
.if !commands(${PROG}) |
.if !commands(${PROG}) |
${_CCLINK} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} -nostdlib ${_PROGLDOPTS} ${LIBCRT0} ${LIBCRTBEGIN} ${OBJS} ${LDADD} -L${DESTDIR}/usr/lib ${_SUPCXX} -lgcc -lc -lgcc ${LIBCRTEND} |
${_CCLINK} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} -nostdlib ${_PROGLDOPTS} ${LIBCRT0} ${LIBCRTBEGIN} ${OBJS} ${LDADD} -L${_GCC_LIBGCCDIR} -L${DESTDIR}/usr/lib ${_SUPCXX} -lgcc -lc -lgcc ${LIBCRTEND} |
.endif |
.endif |
|
|
.else |
.else |