summaryrefslogtreecommitdiff
path: root/toolchain/libelf/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'toolchain/libelf/Makefile')
-rw-r--r--toolchain/libelf/Makefile31
1 files changed, 31 insertions, 0 deletions
diff --git a/toolchain/libelf/Makefile b/toolchain/libelf/Makefile
new file mode 100644
index 000000000..485978cf0
--- /dev/null
+++ b/toolchain/libelf/Makefile
@@ -0,0 +1,31 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(TOPDIR)/rules.mk
+include Makefile.inc
+include ../rules.mk
+include ${TOPDIR}/mk/buildhlp.mk
+
+ifeq (${ADK_MAKE_PARALLEL},y)
+LIBELF_MAKEOPTS+= -j${ADK_MAKE_JOBS}
+endif
+
+$(WRKBUILD)/.headers:
+$(WRKBUILD)/.configured:
+ (cd $(WRKBUILD); \
+ $(WRKBUILD)/configure \
+ --prefix=$(STAGING_HOST_DIR) \
+ --disable-shared \
+ --enable-static \
+ );
+ touch $@
+
+$(WRKBUILD)/.compiled: $(WRKBUILD)/.configured
+ $(MAKE) ${LIBELF_MAKEOPTS} -C $(WRKBUILD) all
+ touch $@
+
+$(WRKBUILD)/.installed: $(WRKBUILD)/.compiled
+ $(MAKE) -C $(WRKBUILD) install
+ touch $@
+
+include ${TOPDIR}/mk/toolchain.mk