ecc4dcbd82
The target machine is represented by TARGET_ARCH. MACHINE_ARCH always represents the host machine. When TARGET_ARCH is not defined, it is assumed to be equal to MACHINE_ARCH. This means that we're building a native toolset by default. We're creating cross-compilation tools when MACHINE_ARCH != TARGET_ARCH. TARGET_ARCH is defined when building binutils as part of the bootstrap build and is set to reflect the architecture we're currently cross- building. With this change binutils is ready for cross-building.
55 lines
1.4 KiB
Makefile
55 lines
1.4 KiB
Makefile
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
.if ${TARGET_ARCH} == "m68k"
|
|
HOST= m68k-unknown-freebsd
|
|
CFLAGS+= -DDEFAULT_EMULATION=\"elf_m68k\"
|
|
CFLAGS+= -DTARGET=\"m68k-unknown-freebsd\"
|
|
_m68k_path= \"/usr/lib\"
|
|
.else
|
|
_m68k_path= \"/usr/cross/m68k-freebsd/usr/lib\"
|
|
.endif
|
|
EMS+= ld_m68kelf_emulation \
|
|
ld_m68klynx_emulation \
|
|
ld_m68knbsd_emulation
|
|
LDSCRIPTS+= m68kelf.x \
|
|
m68kelf.xbn \
|
|
m68kelf.xn \
|
|
m68kelf.xr \
|
|
m68kelf.xs \
|
|
m68kelf.xu \
|
|
m68klynx.x \
|
|
m68klynx.xbn \
|
|
m68klynx.xn \
|
|
m68klynx.xr \
|
|
m68klynx.xu \
|
|
m68knbsd.x \
|
|
m68knbsd.xbn \
|
|
m68knbsd.xn \
|
|
m68knbsd.xr \
|
|
m68knbsd.xu
|
|
SRCS+= em68kelf.c \
|
|
em68klynx.c \
|
|
em68knbsd.c
|
|
CLEANFILES+= em68kelf.c \
|
|
em68klynx.c \
|
|
em68knbsd.c
|
|
|
|
em68kelf.c: emulparams/m68kelf.sh emultempl/elf32.em \
|
|
scripttempl/elf.sc genscripts.sh emultempl/stringify.sed
|
|
sh ${.CURDIR}/genscripts.sh ${BINUTILSDISTDIR}/ld \
|
|
${_m68k_path} notused notused notused m68kelf "" m68kelf
|
|
|
|
em68klynx.c: emulparams/m68klynx.sh emultempl/generic.em \
|
|
scripttempl/m68klynx.sc genscripts.sh emultempl/stringify.sed
|
|
sh ${.CURDIR}/genscripts.sh ${BINUTILSDISTDIR}/ld \
|
|
/usr/cross/m68k-lynx/usr/lib notused notused notused \
|
|
m68klynx "" m68klynx
|
|
|
|
em68knbsd.c: emulparams/m68knbsd.sh emultempl/generic.em \
|
|
scripttempl/aout.sc genscripts.sh emultempl/stringify.sed
|
|
sh ${.CURDIR}/genscripts.sh ${BINUTILSDISTDIR}/ld \
|
|
/usr/cross/m68k-netbsdaout/usr/lib notused notused notused \
|
|
m68knbsd "" m68knbsd
|