make it 'safe' for RO /usr/src

This commit is contained in:
cgd 1993-10-04 01:34:43 +00:00
parent 4e78efb64b
commit f4875ea885

View File

@ -1,5 +1,5 @@
# from: @(#)Makefile 6.1 (Berkeley) 3/3/91
# $Id: Makefile,v 1.3 1993/10/02 20:57:03 pk Exp $
# $Id: Makefile,v 1.4 1993/10/04 01:34:43 cgd Exp $
.if !defined (HOST)
HOST=$(MACHINE)
@ -8,6 +8,10 @@ HOST=$(MACHINE)
OBJFORMAT=aout
.endif
.if exists(${.CURDIR}/obj)
ADDINCLUDE=-I${.CURDIR}/obj
.endif
PROG= as
SRCS= app.c as.c atof-generic.c bignum-copy.c \
cond.c expr.c flo-const.c flo-copy.c flonum-mult.c \
@ -17,20 +21,22 @@ SRCS= app.c as.c atof-generic.c bignum-copy.c \
obj-$(OBJFORMAT).c
# $(srcdir)/strerror.c
# $(srcdir)/strstr.c
CFLAGS+= -I$(.CURDIR) -I$(.CURDIR)/config \
CFLAGS+= -I$(.CURDIR) ${ADDINCLUDE} -I$(.CURDIR)/config \
-DPIC -DOLD_GAS -DSIGTY=void -Derror=as_fatal
.PATH: $(.CURDIR)/config
beforedepend: config.status
$(PROG): config.status
config.status:
ln -s $(.CURDIR)/config/tc-$(MACHINE).h $(.CURDIR)/targ-cpu.h
ln -s $(.CURDIR)/config/obj-$(OBJFORMAT).h $(.CURDIR)/obj-format.h
ln -s $(.CURDIR)/config/ho-$(HOST).h $(.CURDIR)/host.h
/bin/rm -f targ-cpu.h ; ln -s $(.CURDIR)/config/tc-$(MACHINE).h targ-cpu.h
/bin/rm -f obj-format.h ; ln -s $(.CURDIR)/config/obj-$(OBJFORMAT).h obj-format.h
/bin/rm -f host.h ; ln -s $(.CURDIR)/config/ho-$(HOST).h host.h
/bin/rm -f targ-env.h
.if exists ($(.CURDIR)/config/te-$(MACHINE).h)
ln -s $(.CURDIR)/config/te-$(MACHINE).h $(.CURDIR)/targ-env.h
ln -s $(.CURDIR)/config/te-$(MACHINE).h targ-env.h
.else
ln -s $(.CURDIR)/config/te-generic.h $(.CURDIR)/targ-env.h
ln -s $(.CURDIR)/config/te-generic.h targ-env.h
.endif
echo "curdir=$(.CURDIR) machine=$(MACHINE) host=$(HOST)" > $(.TARGET)