151 lines
5.4 KiB
Plaintext
151 lines
5.4 KiB
Plaintext
# Commondefs wrapper for arcs standalone sources.
|
|
#
|
|
# $Revision: 1.114 $
|
|
#
|
|
# Makefiles which include this file must first define DEPTH to be the relative
|
|
# path from their parent directory to the top of the standalone tree. E.g.
|
|
# prom/Makefile sets DEPTH=.. before including ${DEPTH}/commondefs.
|
|
#
|
|
include ${ROOT}/usr/include/make/commondefs
|
|
DEF_CSTYLE=
|
|
|
|
# NOTE! if EVERYPRODUCT changes, you may also need to change
|
|
# EVERYPRODUCT_ARCS in eoe/cmd/fx/Makefile, as the standalone
|
|
# arcs fx is built there.
|
|
EVERYPRODUCT=4D40 4D40_O32 4DACE1 4DACE1_O32 4DMH 4DMH_O32 \
|
|
EVEREST32 EVEREST BB_EVEREST T5_EVEREST TETON T5I2 RACER SN0 SN0PROM
|
|
|
|
EXTRAPRODUCTS=4DCT 4DACE1_64 ${4DXX} RACER_RPROM
|
|
EVERYENDIAN=BE LE BE64 BEN32 BE4DXX
|
|
EVERYARCHENDIAN=R4000BE R4000EL
|
|
ARCS_MACHTAG=mach(CPUBOARD=IP19 CPUBOARD=IP20 CPUBOARD=IP22 CPUBOARD=IP32)
|
|
IDELD_MACHTAG=mach(CPUBOARD=IP19 CPUBOARD=IP20 CPUBOARD=IP22 CPUBOARD=IP32)
|
|
ARCS64_MACHTAG=mach(CPUBOARD=IP21 CPUBOARD=IP25 CPUBOARD=IP26 CPUBOARD=IP27 CPUBOARD=IP28 CPUBOARD=IP30)
|
|
IDELD64_MACHTAG=mach(CPUBOARD=IP21 CPUBOARD=IP25 CPUBOARD=IP26 CPUBOARD=IP28 CPUBOARD=IP30)
|
|
|
|
ENDIANDEFS=$(DEPTH)/ENDIANdefs
|
|
CPUARCHDEFS=$(DEPTH)/$(CPUARCH)$(COMPILATION_MODEL)defs
|
|
MIDEFS=$(DEPTH)/MIdefs
|
|
MKDEPFILE=Makedepend.$(PRODUCT)
|
|
|
|
CVERSION=-xansi $(FULLWARN)
|
|
FULLWARN=-fullwarn
|
|
|
|
#
|
|
# By default, all files are compiled -fullwarn.
|
|
# To override, set FULLWARN to null in individual makefiles.
|
|
# 1068 - integer conversion resulted in a change of sign
|
|
# 1185 - ?
|
|
# 1209 - controlling expression is constant
|
|
# 1505 - implicit conversion from <type> to <type>: rounding,
|
|
# sign extension, or loss of accuracy may result
|
|
# 1506 - the v6.02 compiler changes 1505 to 1506.
|
|
# implicit conversion from <type> to <type>: rounding,
|
|
# sign extension, or loss of accuracy may result
|
|
# 1552 - variable set but never used
|
|
# 1692 - prototyped function redeclared without prototype
|
|
# 1174 - parameter declared but never used
|
|
#
|
|
LWOFF=,1068,1185,1209,1505,1506,1692,1174${LLWOFF}
|
|
|
|
# Standalone library locations, and dependancy locations.
|
|
#
|
|
DLIBSC=$(DEPTH)/lib/libsc/$(ENDIANND)$(CPUARCH_PFIX).O/libsc.a
|
|
DLIBSL=$(DEPTH)/lib/libsl/$(ENDIANND)$(CPUARCH_PFIX).O/libsl.a
|
|
DLIBSK=$(DEPTH)/lib/libsk/$(PRODUCT).O/libsk.a
|
|
DLIBKL=$(DEPTH)/lib/libkl/$(PRODUCT).O/libkl.a
|
|
|
|
LIBSC=$(LIBDEPTH)/lib/libsc/$(ENDIANND)$(CPUARCH_PFIX).O/libsc.a
|
|
LIBSL=$(LIBDEPTH)/lib/libsl/$(ENDIANND)$(CPUARCH_PFIX).O/libsl.a
|
|
LIBSK=$(LIBDEPTH)/lib/libsk/$(PRODUCT).O/libsk.a
|
|
LIBKL=$(LIBDEPTH)/lib/libkl/$(PRODUCT).O/libkl.a
|
|
DEPLIB= $(DLIBSC) $(LDEPLIB)
|
|
|
|
DCPULIBSC=$(DEPTH)/lib/libwarsc/$(CPUBOARD)$(ENDIANND)$(CPUARCH_PFIX).O/libsc.a
|
|
CPULIBSC=$(LIBDEPTH)/lib/libwarsc/$(CPUBOARD)$(ENDIANND)$(CPUARCH_PFIX).O/libsc.a
|
|
|
|
# If a lower-level makefile needs to add its own includes, compiler
|
|
# options, or definitions, it should define LLCINCS, LLCDEFS, or LLCOPTS
|
|
#
|
|
LCINCS=-I${DEPTH}/include ${LLCINCS}
|
|
LCDEFS= -D_STANDALONE -DMP $(KMODEOPT) $(DKERNEL) $(CPUARCH_DEFS) ${LLCDEFS} $(PRODDEFS)
|
|
LCOPTS= ${CPUARCH_MI_COPTS} ${CPUARCH_MD_COPTS} ${LLCOPTS}
|
|
|
|
# LCDEFS defines _KERNEL by defaut, but make it overrideable.
|
|
DKERNEL=-D_KERNEL
|
|
|
|
# Was GLDOPTS= -nostdlib
|
|
# but there needs to be a(32 vs 64) decision for which one to use.
|
|
|
|
#if !defined(PRODUCT)
|
|
GLDOPTS = $(GLDOPTS_32)
|
|
#elif defined(COMPILATION_MODEL) && $(COMPILATION_MODEL) == "64"
|
|
GLDOPTS = $(GLDOPTS_64)
|
|
#else
|
|
GLDOPTS = $(GLDOPTS_32)
|
|
#endif
|
|
|
|
GLDLIBS= $(LIBSC)
|
|
|
|
# LIBDEPTH is the relative path to arcs/lib for use when linking. Where
|
|
# linking is done by cd'ing into a product dependent build area, LLIBDEPTH
|
|
# should be set to add the correct depth to $(DEPTH) {usually "../"}.
|
|
#
|
|
LIBDEPTH=$(LLIBDEPTH)$(DEPTH)
|
|
|
|
# If a makefile wants to extend clean up, it should define LLDIRT
|
|
#
|
|
LDIRT=*.ln $(LLDIRT)
|
|
|
|
# All assembly source follows C source conventions as much as
|
|
# possible. Where differences are unavoidable, #ifdef _LANGUAGE_ASSEMBLER
|
|
# may be used.
|
|
#
|
|
MKDEPOPT = -MDupdate $(MKDEPFILE)
|
|
ASFLAGS=$(CPUARCH_MI_ASOPTS) $(CPUARCH_MD_ASOPTS) -DLOCORE \
|
|
$(CDEFS) $(CINCS) $(PRODDEFS) $(MKDEPOPT) $(OPTIMIZER)
|
|
|
|
SHDLIBC=
|
|
|
|
# Definitions for the version file generator and dependency filename.
|
|
#
|
|
NEWVERS= sh ${DEPTH}/newvers.sh
|
|
|
|
# Default place for objects
|
|
#
|
|
# Where machine dependent builds take place, OBJECTDIR should be overridden
|
|
# with TARGETDIR or whereever objects are to be placed.
|
|
#
|
|
OBJECTDIR=.
|
|
|
|
# Lint options
|
|
#
|
|
LOBJECTS=${CFILES:.c=.ln}
|
|
LINTCFLAGS= $(VCFLAGS) $(LCFLAGS) $(GCDEFS) $(GCINCS) \
|
|
$(OPTIMIZER) $(PROTOTYPES) $(LLINTFLAGS) -u -n -z
|
|
LINTLLFLAGS=-n -u -z
|
|
LINTLDFLAGS=-n -x
|
|
LINTDIR=$(OBJECTDIR)
|
|
LMKDEPCFLAGS= $(KMKDEPCFLAGS) -e 's@^\(.*\)\.o:@\1.o \1.ln:@'
|
|
|
|
# Standalone configuration. Override in $(PRODUCTDEFS) if you have some-
|
|
# thing different. $(ALLCFDIRT) can be used to remove all configuration dirt
|
|
# for directories that can be build for multiple configurations.
|
|
# $(PSCFG) is PROM config and allows file to be overridden in XXXXdefs
|
|
# file for prom builds only.
|
|
#
|
|
GCONF=$(DEPTH)/scripts/gconf
|
|
SCFG=$(CPUBOARD)conf
|
|
PSCFG=$(SCFG)
|
|
ALLCFFILES= `echo *.cf | sed 's/\.cf/\.X /g'`
|
|
ALLCFDIRT= ${ALLCFFILES:.X=.c} ${ALLCFFILES:.X=.h}
|
|
DEFCFG=$(DEPTH)/lib/cfg/$(PRODUCT).O/*.o
|
|
|
|
# Some programs use convert
|
|
CONVERT=$(TOOLROOTSAFE) $(WORKAREA)/stand/arcs/tools/convert/convert
|
|
PROMCVT=$(TOOLROOTSAFE) $(WORKAREA)/stand/arcs/tools/promcvt/promcvt
|
|
PROMGEN=$(TOOLROOTSAFE) $(WORKAREA)/stand/arcs/tools/promgen/promgen
|
|
ELF2COFF=$(TOOLROOTSAFE) $(WORKAREA)/stand/arcs/tools/elf2coff/elf2coff
|
|
|
|
sinclude $(DEPTH)/alocaldefs
|