better support environments (e.g. pc532, hp300) where machine type != cpu

type.  also, deal reasonably with not being able to find a host environment
definition.
This commit is contained in:
cgd 1993-10-16 03:19:36 +00:00
parent 59ebb74a4b
commit 279217b6b8
1 changed files with 21 additions and 13 deletions

View File

@ -1,11 +1,16 @@
# from: @(#)Makefile 6.1 (Berkeley) 3/3/91
# $Id: Makefile,v 1.7 1993/10/13 02:00:30 cgd Exp $
# $Id: Makefile,v 1.8 1993/10/16 03:19:36 cgd Exp $
.if !defined (hosttype)
hosttype=$(MACHINE)
.include "config/Makefile.$(MACHINE)"
.if !defined (gas_hosttype)
gas_hosttype=$(MACHINE)
.endif
.if !defined (OBJFORMAT)
OBJFORMAT=aout
.if !defined (gas_target)
gas_target=$(MACHINE)
.endif
.if !defined (gas_objformat)
gas_objformat=aout
.endif
.if exists(${.CURDIR}/obj)
@ -13,12 +18,12 @@ ADDINCLUDE=-I${.CURDIR}/obj
.endif
PROG= as
SRCS= app.c as.c atof-generic.c bignum-copy.c \
SRCS+= app.c as.c atof-generic.c bignum-copy.c \
cond.c expr.c flo-const.c flo-copy.c flonum-mult.c \
frags.c hash.c hex-value.c input-file.c input-scrub.c \
listing.c messages.c obstack.c output-file.c read.c subsegs.c \
symbols.c version.c write.c xmalloc.c xrealloc.c \
obj-$(OBJFORMAT).c
obj-$(gas_objformat).c
CFLAGS+= -I$(.CURDIR) ${ADDINCLUDE} -I$(.CURDIR)/config \
-DPIC -DOLD_GAS -DSIGTY=void -Derror=as_fatal
#LDADD+= -lgnumalloc
@ -30,19 +35,22 @@ beforedepend: config.status
$(PROG): config.status
config.status:
/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-$(hosttype).h host.h
/bin/rm -f targ-cpu.h ; ln -s $(.CURDIR)/config/tc-$(gas_target).h targ-cpu.h
/bin/rm -f obj-format.h ; ln -s $(.CURDIR)/config/obj-$(gas_objformat).h obj-format.h
/bin/rm -f host.h
.if exists ($(.CURDIR)/config/ho-$(gas_hosttype).h)
ln -s $(.CURDIR)/config/ho-$(gas_hosttype).h host.h
.else
ln -s $(.CURDIR)/config/ho-generic.h host.h
.endif
/bin/rm -f targ-env.h
.if exists ($(.CURDIR)/config/te-$(MACHINE).h)
ln -s $(.CURDIR)/config/te-$(MACHINE).h targ-env.h
.else
ln -s $(.CURDIR)/config/te-generic.h targ-env.h
.endif
echo "curdir=$(.CURDIR) machine=$(MACHINE) host=$(hosttype)" > $(.TARGET)
echo "curdir=$(.CURDIR) machine=$(gas_target) host=$(gas_hosttype)" > $(.TARGET)
CLEANFILES+= targ-cpu.h obj-format.h host.h targ-env.h config.status
.include "config/Makefile.$(MACHINE)"
.include <bsd.prog.mk>