* use CPPFLAGS instead of CFLAGS for -D and -I options

* use COPTS instead of CFLAGS for -fPIC et al
* use ${COMPILE.c} instead of ${CC} ${CFLAGS} -c
* use FILES and FILESDIR to install pc532 objects (instead of install: rule) -
  this makes it consistent with the other a.out ports (arm32, i386, m68k, sparc)
This commit is contained in:
lukem 1997-10-22 16:00:39 +00:00
parent 345ae6924d
commit 6bf85c9ba3
10 changed files with 96 additions and 95 deletions

View File

@ -1,12 +1,13 @@
# $NetBSD: Makefile,v 1.13 1997/05/31 21:21:39 cjs Exp $
# $NetBSD: Makefile,v 1.14 1997/10/22 16:00:39 lukem Exp $
.include <bsd.own.mk> # for ECOFF_TOOLCHAIN definition
CFLAGS+= -DLIBC_SCCS -fPIC -DPIC -DDYNAMIC -DELFSIZE=64
CFLAGS+= -I${.CURDIR}/../../../libexec/ld.elf_so
CPPFLAGS+= -DLIBC_SCCS -DPIC -DDYNAMIC -DELFSIZE=64
CPPFLAGS+= -I${.CURDIR}/../../../libexec/ld.elf_so
COPT+= -fPIC
.if defined(ECOFF_TOOLCHAIN)
CFLAGS+= -DECOFF_COMPAT
CPPFLAGS+= -DECOFF_COMPAT
.endif
OBJS= crt0.o gcrt0.o crtbegin.o crtend.o
@ -16,26 +17,26 @@ CLEANFILES+= core a.out
all: ${OBJS}
crt0.o: crt0.c
@echo ${CC} ${CFLAGS} -DCRT0 -c ${.ALLSRC} -o ${.TARGET}
@${CC} ${CFLAGS} -DCRT0 -c ${.ALLSRC} -o ${.TARGET}.o
@echo "${COMPILE.c} -DCRT0 ${.ALLSRC} -o ${.TARGET}"
@${COMPILE.c} -DCRT0 ${.ALLSRC} -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
gcrt0.o: crt0.c
@echo ${CC} ${CFLAGS} -DMCRT0 -c ${.ALLSRC} -o ${.TARGET}
@${CC} ${CFLAGS} -DMCRT0 -c ${.ALLSRC} -o ${.TARGET}.o
@echo "${COMPILE.c} -DMCRT0 ${.ALLSRC} -o ${.TARGET}"
@${COMPILE.c} -DMCRT0 ${.ALLSRC} -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
crtbegin.o: crtbegin.c
@echo ${CC} ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET}
@${CC} ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET}.o
@echo "${COMPILE.c} ${.ALLSRC} -o ${.TARGET}"
@${COMPILE.c} ${.ALLSRC} -o ${.TARGET}
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
crtend.o: crtend.c
@echo ${CC} ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET}
@${CC} ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET}.o
@echo "${COMPILE.c} ${.ALLSRC} -o ${.TARGET}"
@${COMPILE.c} ${.ALLSRC} -o ${.TARGET}
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o

View File

@ -1,28 +1,28 @@
# $NetBSD: Makefile,v 1.8 1997/10/05 23:10:36 mark Exp $
# $NetBSD: Makefile,v 1.9 1997/10/22 16:01:08 lukem Exp $
# from: @(#)Makefile 5.6 (Berkeley) 5/22/91
CFLAGS+= -DLIBC_SCCS -I${.CURDIR}/..
CPPFLAGS+= -DLIBC_SCCS -I${.CURDIR}/..
OBJS= crt0.o gcrt0.o scrt0.o
SRCS= crt0.c
all: ${OBJS}
crt0.o: ${SRCS}
@echo "${COMPILE.c} -DCRT0 -DDYNAMIC ${.CURDIR}/${SRCS} -o ${.TARGET}"
@${COMPILE.c} -DCRT0 -DDYNAMIC ${.CURDIR}/${SRCS} -o ${.TARGET}.o
@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
@echo "${COMPILE.c} -DCRT0 -DDYNAMIC ${.ALLSRC} -o ${.TARGET}"
@${COMPILE.c} -DCRT0 -DDYNAMIC ${.ALLSRC} -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
gcrt0.o: ${SRCS}
@echo "${COMPILE.c} -DMCRT0 ${.CURDIR}/${SRCS} -o ${.TARGET}"
@${COMPILE.c} -DMCRT0 ${.CURDIR}/${SRCS} -o ${.TARGET}.o
@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
@echo "${COMPILE.c} -DMCRT0 ${.ALLSRC} -o ${.TARGET}"
@${COMPILE.c} -DMCRT0 ${.ALLSRC} -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
scrt0.o: ${SRCS}
@echo "${COMPILE.c} -DSCRT0 ${.CURDIR}/${SRCS} -o ${.TARGET}"
@${COMPILE.c} -DSCRT0 ${.CURDIR}/${SRCS} -o ${.TARGET}.o
@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
@echo "${COMPILE.c} -DSCRT0 ${.ALLSRC} -o ${.TARGET}"
@${COMPILE.c} -DSCRT0 ${.ALLSRC} -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
.if make(depend)

View File

@ -1,8 +1,8 @@
# $NetBSD: Makefile,v 1.9 1997/05/31 21:21:41 cjs Exp $
# $NetBSD: Makefile,v 1.10 1997/10/22 16:01:28 lukem Exp $
CFLAGS+= -DLIBC_SCCS
CPPFLAGS+= -DLIBC_SCCS
.if (${MACHINE_ARCH} != "powerpc")
CFLAGS+= -fpic
COPTS+= -fpic
.endif
OBJS= c++rt0.o

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.22 1997/10/21 23:59:18 lukem Exp $
# $NetBSD: Makefile,v 1.23 1997/10/22 16:01:50 lukem Exp $
# from: @(#)Makefile 5.5 (Berkeley) 5/21/91
CPPFLAGS+= -DLIBC_SCCS -I${.CURDIR}/..
@ -8,21 +8,21 @@ SRCS= crt0.c
all: ${OBJS}
crt0.o: ${SRCS}
@echo "${COMPILE.c} -DCRT0 -DDYNAMIC ${.CURDIR}/${SRCS} -o ${.TARGET}"
@${COMPILE.c} -DCRT0 -DDYNAMIC ${.CURDIR}/${SRCS} -o ${.TARGET}.o
@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
@echo "${COMPILE.c} -DCRT0 -DDYNAMIC ${.ALLSRC} -o ${.TARGET}"
@${COMPILE.c} -DCRT0 -DDYNAMIC ${.ALLSRC} -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
gcrt0.o: ${SRCS}
@echo "${COMPILE.c} -DMCRT0 ${.CURDIR}/${SRCS} -o ${.TARGET}"
@${COMPILE.c} -DMCRT0 ${.CURDIR}/${SRCS} -o ${.TARGET}.o
@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
@echo "${COMPILE.c} -DMCRT0 ${.ALLSRC} -o ${.TARGET}"
@${COMPILE.c} -DMCRT0 ${.ALLSRC} -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
scrt0.o: ${SRCS}
@echo "${COMPILE.c} -DSCRT0 ${.CURDIR}/${SRCS} -o ${.TARGET}"
@${COMPILE.c} -DSCRT0 ${.CURDIR}/${SRCS} -o ${.TARGET}.o
@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
@echo "${COMPILE.c} -DSCRT0 ${.ALLSRC} -o ${.TARGET}"
@${COMPILE.c} -DSCRT0 ${.ALLSRC} -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
.if make(depend)

View File

@ -1,28 +1,28 @@
# $NetBSD: Makefile,v 1.14 1997/06/12 12:18:11 veego Exp $
# $NetBSD: Makefile,v 1.15 1997/10/22 16:02:08 lukem Exp $
# from: @(#)Makefile 5.5 (Berkeley) 5/21/91
CFLAGS+= -DLIBC_SCCS -I${.CURDIR}/..
CPPFLAGS+= -DLIBC_SCCS -I${.CURDIR}/..
OBJS= crt0.o gcrt0.o scrt0.o
SRCS= crt0.c
all: ${OBJS}
crt0.o: ${SRCS}
@echo "${COMPILE.c} -DCRT0 -DDYNAMIC ${.CURDIR}/${SRCS} -o ${.TARGET}"
@${COMPILE.c} -DCRT0 -DDYNAMIC ${.CURDIR}/${SRCS} -o ${.TARGET}.o
@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
@echo "${COMPILE.c} -DCRT0 -DDYNAMIC ${.ALLSRC} -o ${.TARGET}"
@${COMPILE.c} -DCRT0 -DDYNAMIC ${.ALLSRC} -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
gcrt0.o: ${SRCS}
@echo "${COMPILE.c} -DMCRT0 ${.CURDIR}/${SRCS} -o ${.TARGET}"
@${COMPILE.c} -DMCRT0 ${.CURDIR}/${SRCS} -o ${.TARGET}.o
@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
@echo "${COMPILE.c} -DMCRT0 ${.ALLSRC} -o ${.TARGET}"
@${COMPILE.c} -DMCRT0 ${.ALLSRC} -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
scrt0.o: ${SRCS}
@echo "${COMPILE.c} -DSCRT0 ${.CURDIR}/${SRCS} -o ${.TARGET}"
@${COMPILE.c} -DSCRT0 ${.CURDIR}/${SRCS} -o ${.TARGET}.o
@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
@echo "${COMPILE.c} -DSCRT0 ${.ALLSRC} -o ${.TARGET}"
@${COMPILE.c} -DSCRT0 ${.ALLSRC} -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
.if make(depend)

View File

@ -1,8 +1,9 @@
# $NetBSD: Makefile,v 1.16 1997/06/28 08:21:52 jonathan Exp $
# $NetBSD: Makefile,v 1.17 1997/10/22 16:02:27 lukem Exp $
# from: @(#)Makefile 8.1 (Berkeley) 6/1/93
CFLAGS+= -DLIBC_SCCS -fPIC -DPIC -DDYNAMIC -DELFSIZE=32
CFLAGS+= -I${.CURDIR}/../../../libexec/ld.elf_so
CPPFLAGS+= -DLIBC_SCCS -DPIC -DDYNAMIC -DELFSIZE=32
CPPFLAGS+= -I${.CURDIR}/../../../libexec/ld.elf_so
COPTS+= -fPIC
OBJS= crt0.o gcrt0.o crtn.o # crtbegin.o crtend.o
CLEANFILES+= core a.out
@ -10,20 +11,20 @@ CLEANFILES+= core a.out
all: ${OBJS}
crt0.o: crt0.c
@echo ${CC} ${CFLAGS} -DCRT0 -c ${.ALLSRC} -o ${.TARGET}
@${CC} ${CFLAGS} -DCRT0 -c ${.ALLSRC} -o ${.TARGET}.o
@echo "${COMPILE.c} -DCRT0 ${.ALLSRC} -o ${.TARGET}"
@${COMPILE.c} -DCRT0 ${.ALLSRC} -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
gcrt0.o: crt0.c
@echo ${CC} ${CFLAGS} -DMCRT0 -c ${.ALLSRC} -o ${.TARGET}
@${CC} ${CFLAGS} -DMCRT0 -c ${.ALLSRC} -o ${.TARGET}.o
@echo "${COMPILE.c} -DMCRT0 ${.ALLSRC} -o ${.TARGET}"
@${COMPILE.c} -DMCRT0 ${.ALLSRC} -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
crtn.o: crtend.c
@echo ${CC} ${CFLAGS} -DMCRT0 -c ${.ALLSRC} -o ${.TARGET}
@${CC} ${CFLAGS} -DMCRT0 -c ${.ALLSRC} -o ${.TARGET}.o
@echo "${COMPILE.c} -DMCRT0 ${.ALLSRC} -o ${.TARGET}"
@${COMPILE.c} -DMCRT0 ${.ALLSRC} -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o

View File

@ -1,34 +1,30 @@
# $NetBSD: Makefile,v 1.14 1997/05/31 21:21:46 cjs Exp $
# $NetBSD: Makefile,v 1.15 1997/10/22 16:02:46 lukem Exp $
# from: @(#)Makefile 5.5 (Berkeley) 5/21/91
CFLAGS+= -DLIBC_SCCS -I${.CURDIR}/..
CPPFLAGS+= -DLIBC_SCCS -I${.CURDIR}/..
OBJS= crt0.o gcrt0.o scrt0.o
SRCS= crt0.c
all: ${OBJS}
crt0.o: ${SRCS}
@echo "${COMPILE.c} -DCRT0 -DDYNAMIC ${.CURDIR}/${SRCS} -o ${.TARGET}"
@${COMPILE.c} -DCRT0 -DDYNAMIC ${.CURDIR}/${SRCS} -o ${.TARGET}.o
@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
@echo "${COMPILE.c} -DCRT0 -DDYNAMIC ${.ALLSRC} -o ${.TARGET}"
@${COMPILE.c} -DCRT0 -DDYNAMIC ${.ALLSRC} -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
gcrt0.o: ${SRCS}
@echo "${COMPILE.c} -DMCRT0 ${.CURDIR}/${SRCS} -o ${.TARGET}"
@${COMPILE.c} -DMCRT0 ${.CURDIR}/${SRCS} -o ${.TARGET}.o
@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
@echo "${COMPILE.c} -DMCRT0 ${.ALLSRC} -o ${.TARGET}"
@${COMPILE.c} -DMCRT0 ${.ALLSRC} -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
scrt0.o: ${SRCS}
@echo "${COMPILE.c} -DSCRT0 ${.CURDIR}/${SRCS} -o ${.TARGET}"
@${COMPILE.c} -DSCRT0 ${.CURDIR}/${SRCS} -o ${.TARGET}.o
@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
@echo "${COMPILE.c} -DSCRT0 ${.ALLSRC} -o ${.TARGET}"
@${COMPILE.c} -DSCRT0 ${.ALLSRC} -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
install:
${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 444 ${OBJS} \
${DESTDIR}/usr/lib
.if make(depend)
CPPFLAGS+= -DDYNAMIC
.endif
@ -39,4 +35,7 @@ afterdepend: .depend
< .depend > $$TMP; \
mv $$TMP .depend)
FILES=${OBJS}
FILESDIR=/usr/lib
.include <bsd.prog.mk>

View File

@ -1,7 +1,7 @@
# $NetBSD: Makefile,v 1.4 1997/05/31 21:21:47 cjs Exp $
# $NetBSD: Makefile,v 1.5 1997/10/22 16:03:05 lukem Exp $
CFLAGS+= -DLIBC_SCCS -DPIC # -DDYNAMIC
CFLAGS+= -I${.CURDIR}/../../../libexec/ld.elf_so
CPPFLAGS+= -DLIBC_SCCS -DPIC # -DDYNAMIC
CPPFLAGS+= -I${.CURDIR}/../../../libexec/ld.elf_so
OBJS= crt0.o gcrt0.o crtbegin.o crtend.o
@ -10,26 +10,26 @@ CLEANFILES+= core a.out
all: ${OBJS}
crt0.o: crt0.c
@echo ${CC} ${CFLAGS} -DCRT0 -c ${.ALLSRC} -o ${.TARGET}
@${CC} ${CFLAGS} -DCRT0 -c ${.ALLSRC} -o ${.TARGET}.o
@echo "${COMPILE.c} -DCRT0 ${.ALLSRC} -o ${.TARGET}"
@${COMPILE.c} -DCRT0 ${.ALLSRC} -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
gcrt0.o: crt0.c
@echo ${CC} ${CFLAGS} -DMCRT0 -c ${.ALLSRC} -o ${.TARGET}
@${CC} ${CFLAGS} -DMCRT0 -c ${.ALLSRC} -o ${.TARGET}.o
@echo "${COMPILE.c} -DMCRT0 ${.ALLSRC} -o ${.TARGET}"
@${COMPILE.c} -DMCRT0 ${.ALLSRC} -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
crtbegin.o: crtbegin.c
@echo ${CC} ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET}
@${CC} ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET}.o
@echo "${COMPILE.c} ${.ALLSRC} -o ${.TARGET}"
@${COMPILE.c} ${.ALLSRC} -o ${.TARGET}
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
crtend.o: crtend.c
@echo ${CC} ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET}
@${CC} ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET}.o
@echo "${COMPILE.c} ${.ALLSRC} -o ${.TARGET}"
@${COMPILE.c} ${.ALLSRC} -o ${.TARGET}
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o

View File

@ -1,28 +1,28 @@
# $NetBSD: Makefile,v 1.15 1997/06/05 21:30:54 christos Exp $
# $NetBSD: Makefile,v 1.16 1997/10/22 16:03:28 lukem Exp $
# from: @(#)Makefile 5.5 (Berkeley) 5/21/91
CFLAGS+= -DLIBC_SCCS -I${.CURDIR}/..
CPPFLAGS+= -DLIBC_SCCS -I${.CURDIR}/..
OBJS= crt0.o gcrt0.o scrt0.o
SRCS= crt0.c
all: ${OBJS}
crt0.o: ${SRCS}
@echo "${COMPILE.c} -DCRT0 -DDYNAMIC ${.CURDIR}/${SRCS} -o ${.TARGET}"
@${COMPILE.c} -DCRT0 -DDYNAMIC ${.CURDIR}/${SRCS} -o ${.TARGET}.o
@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
@echo "${COMPILE.c} -DCRT0 -DDYNAMIC ${.ALLSRC} -o ${.TARGET}"
@${COMPILE.c} -DCRT0 -DDYNAMIC ${.ALLSRC} -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
gcrt0.o: ${SRCS}
@echo "${COMPILE.c} -DMCRT0 ${.CURDIR}/${SRCS} -o ${.TARGET}"
@${COMPILE.c} -DMCRT0 ${.CURDIR}/${SRCS} -o ${.TARGET}.o
@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
@echo "${COMPILE.c} -DMCRT0 ${.ALLSRC} -o ${.TARGET}"
@${COMPILE.c} -DMCRT0 ${.ALLSRC} -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
scrt0.o: ${SRCS}
@echo "${COMPILE.c} -DSCRT0 ${.CURDIR}/${SRCS} -o ${.TARGET}"
@${COMPILE.c} -DSCRT0 ${.CURDIR}/${SRCS} -o ${.TARGET}.o
@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
@echo "${COMPILE.c} -DSCRT0 ${.ALLSRC} -o ${.TARGET}"
@${COMPILE.c} -DSCRT0 ${.ALLSRC} -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
.if make(depend)

View File

@ -1,7 +1,7 @@
# $NetBSD: Makefile,v 1.8 1997/05/31 21:21:49 cjs Exp $
# $NetBSD: Makefile,v 1.9 1997/10/22 16:03:51 lukem Exp $
# from: @(#)Makefile 5.6 (Berkeley) 5/22/91
CFLAGS+= -DLIBC_SCCS -I${.CURDIR}/..
CPPFLAGS+= -DLIBC_SCCS -I${.CURDIR}/..
OBJS= crt0.o gcrt0.o scrt0.o
CLEANFILES+= core a.out