summaryrefslogtreecommitdiff
path: root/toolchain/newlib/Makefile
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2015-12-03 11:46:03 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2015-12-03 16:56:48 +0100
commitf250397c96dbfb7f3ea1c0a5ae1d9d1a82e1f4b2 (patch)
treef81555843257cc2d249ab660a4d6f2f386fecc4e /toolchain/newlib/Makefile
parent7d455976fb819146a50a8fa0483730b16231171f (diff)
toolchain: add newlib support
OpenADK can now build bare-metal toolchains. Tested for ARM/MIPS. No runtime testing, yet.
Diffstat (limited to 'toolchain/newlib/Makefile')
-rw-r--r--toolchain/newlib/Makefile39
1 files changed, 39 insertions, 0 deletions
diff --git a/toolchain/newlib/Makefile b/toolchain/newlib/Makefile
new file mode 100644
index 000000000..246927667
--- /dev/null
+++ b/toolchain/newlib/Makefile
@@ -0,0 +1,39 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(ADK_TOPDIR)/rules.mk
+include ../rules.mk
+include Makefile.inc
+include ${ADK_TOPDIR}/mk/buildhlp.mk
+
+$(WRKBUILD)/.configured:
+ (cd $(WRKBUILD); \
+ CC='' \
+ CFLAGS='' \
+ LDFLAGS='' \
+ have_doc='' \
+ ./configure --prefix=/usr \
+ --target=$(GNU_TARGET_NAME) \
+ --enable-newlib-io-long-long \
+ --enable-newlib-register-fini \
+ --disable-newlib-supplied-syscalls \
+ --disable-nls \
+ )
+ touch $@
+
+$(WRKBUILD)/.compiled:
+ PATH='$(HOST_PATH)' $(MAKE) -C $(WRKBUILD) \
+ CC='' \
+ CFLAGS='$(TARGET_CFLAGS)' \
+ all
+ touch $@
+
+$(WRKBUILD)/.installed: $(WRKBUILD)/.compiled
+ PATH='$(HOST_PATH)' $(MAKE) -C $(WRKBUILD) \
+ CC='' \
+ CFLAGS='$(TARGET_CFLAGS)' \
+ DESTDIR=$(STAGING_TARGET_DIR) \
+ install
+ touch $@
+
+include ${ADK_TOPDIR}/mk/toolchain.mk