aboutsummaryrefslogtreecommitdiff
path: root/tools/depends/target/p8-platform/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'tools/depends/target/p8-platform/Makefile')
-rw-r--r--tools/depends/target/p8-platform/Makefile34
1 files changed, 34 insertions, 0 deletions
diff --git a/tools/depends/target/p8-platform/Makefile b/tools/depends/target/p8-platform/Makefile
new file mode 100644
index 0000000000..d5918d7ac5
--- /dev/null
+++ b/tools/depends/target/p8-platform/Makefile
@@ -0,0 +1,34 @@
+include ../../Makefile.include
+DEPS= ../../Makefile.include Makefile
+
+# lib name, version
+LIBNAME=p8-platform
+VERSION=2.1.0.1
+SOURCE=$(LIBNAME)-$(VERSION)
+ARCHIVE=$(SOURCE).tar.gz
+
+LIBDYLIB=$(PLATFORM)/build/src/$(LIBNAME).a
+
+all: .installed-$(PLATFORM)
+
+$(TARBALLS_LOCATION)/$(ARCHIVE):
+ cd $(TARBALLS_LOCATION); $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
+
+$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
+ rm -rf $(PLATFORM); mkdir -p $(PLATFORM)/build
+ cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
+ cd $(PLATFORM)/build; $(CMAKE) -DBUILD_SHARED_LIBS=0 -DCMAKE_INSTALL_LIBDIR=$(PREFIX)/lib ..
+
+$(LIBDYLIB): $(PLATFORM)
+ $(MAKE) -C $(PLATFORM)/build
+
+.installed-$(PLATFORM): $(LIBDYLIB)
+ $(MAKE) -C $(PLATFORM)/build install
+ touch $@
+
+clean:
+ rm -rf $(PLATFORM) .installed-$(PLATFORM)
+
+distclean::
+ rm -rf $(PLATFORM) .installed-$(PLATFORM)
+