diff options
author | Vincent Sanders <vince@kyllikki.org> | 2021-01-17 20:06:24 +0000 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2021-01-17 20:06:24 +0000 |
commit | 5db541a6d7e1d6ae7792e392f8e7dd5d5b07345f (patch) | |
tree | b50d63dae50a85a7d3095a77bb2bb84c021f6a3e /frontends/riscos/Makefile.tools | |
parent | 25c21e5fefc554c1941aa1a99b5b7a6c6ca67589 (diff) | |
download | netsurf-5db541a6d7e1d6ae7792e392f8e7dd5d5b07345f.tar.gz netsurf-5db541a6d7e1d6ae7792e392f8e7dd5d5b07345f.tar.bz2 |
Improve target setup in makefiles
split out HOST TARGET and SUBTARGET generation into separate file.
split out target(frontend) specific tool settings into separate files.
Diffstat (limited to 'frontends/riscos/Makefile.tools')
-rw-r--r-- | frontends/riscos/Makefile.tools | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/frontends/riscos/Makefile.tools b/frontends/riscos/Makefile.tools new file mode 100644 index 000000000..9ea5c29f2 --- /dev/null +++ b/frontends/riscos/Makefile.tools @@ -0,0 +1,52 @@ +# -*- mode: makefile-gmake -*- +## +## RISC OS target tool setup +## + +ifeq ($(HOST),riscos) + # Build for RO on RO + GCCSDK_INSTALL_ENV := <NSLibs$$Dir> + CCRES := ccres + TPLEXT := + MAKERUN := makerun + SQUEEZE := squeeze + RUNEXT := + CC := gcc + CXX := g++ + EXEEXT := + PKG_CONFIG := +else + # Cross-build for RO (either using GCCSDK 3.4.6 - AOF, + # either using GCCSDK 4 - ELF) + ifeq ($(origin GCCSDK_INSTALL_ENV),undefined) + ifneq ($(realpath /opt/netsurf/arm-unknown-riscos/env),) + GCCSDK_INSTALL_ENV := /opt/netsurf/arm-unknown-riscos/env + else + GCCSDK_INSTALL_ENV := /home/riscos/env + endif + endif + ifeq ($(origin GCCSDK_INSTALL_CROSSBIN),undefined) + ifneq ($(realpath /opt/netsurf/arm-unknown-riscos/cross/bin),) + GCCSDK_INSTALL_CROSSBIN := /opt/netsurf/arm-unknown-riscos/cross/bin + else + GCCSDK_INSTALL_CROSSBIN := /home/riscos/cross/bin + endif + endif + + CCRES := $(GCCSDK_INSTALL_CROSSBIN)/ccres + TPLEXT := ,fec + MAKERUN := $(GCCSDK_INSTALL_CROSSBIN)/makerun + SQUEEZE := $(GCCSDK_INSTALL_CROSSBIN)/squeeze + RUNEXT := ,feb + CC := $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*gcc) + ifneq (,$(findstring arm-unknown-riscos-gcc,$(CC))) + SUBTARGET := -elf + EXEEXT := ,e1f + ELF2AIF := $(GCCSDK_INSTALL_CROSSBIN)/elf2aif + else + SUBTARGET := -aof + EXEEXT := ,ff8 + endif + CXX := $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*g++) + PKG_CONFIG := $(GCCSDK_INSTALL_ENV)/ro-pkg-config +endif |