summaryrefslogtreecommitdiff
path: root/cleopatre/buildroot/package/libalme/libalme.mk
diff options
context:
space:
mode:
Diffstat (limited to 'cleopatre/buildroot/package/libalme/libalme.mk')
-rw-r--r--cleopatre/buildroot/package/libalme/libalme.mk73
1 files changed, 73 insertions, 0 deletions
diff --git a/cleopatre/buildroot/package/libalme/libalme.mk b/cleopatre/buildroot/package/libalme/libalme.mk
new file mode 100644
index 0000000000..9d5c73cf83
--- /dev/null
+++ b/cleopatre/buildroot/package/libalme/libalme.mk
@@ -0,0 +1,73 @@
+#############################################################
+#
+# libalme (provides APIs for ALME communications needed by applications)
+#
+#############################################################
+# (C) Copyright 2013 MStar Semiconductor, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Library General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA
+#
+
+LIBALME_VERSION_MSB:=0
+LIBALME_VERSION:=$(LIBALME_VERSION_MSB).0.1
+LIBALME_SITE:=$(BASE_DIR)/../application/libalme
+LIBALME_NAME:=libalme.so.$(LIBALME_VERSION)
+LIBALME_DIR:=$(BUILD_DIR)/libalme-$(LIBALME_VERSION)
+
+LIBALME_BIN_SO := $(LIBALME_SITE)/libalme.so $(LIBALME_DIR)/libalme.so
+
+libalme-source:
+
+$(LIBALME_DIR)/.unpacked:
+ ln -s $(LIBALME_SITE) $(LIBALME_DIR)
+ touch $(LIBALME_DIR)/.unpacked
+
+$(LIBALME_DIR)/.configured: $(LIBALME_DIR)/.unpacked
+ touch $(LIBALME_DIR)/.configured
+
+$(LIBALME_BIN_SO): $(LIBALME_DIR)/.configured FORCE_LIBALME_MAKE
+ @$(TARGET_CONFIGURE_OPTS) \
+ $(MAKE) -C $(LIBALME_DIR) libalme.so
+
+$(TARGET_DIR)/usr/lib/$(LIBALME_NAME): $(LIBALME_DIR)/libalme.so
+ mkdir -p $(TARGET_DIR)/usr/lib
+ cp $< $@
+ (cd $(TARGET_DIR)/usr/lib; \
+ ln -fs $(LIBALME_NAME) libalme.so; \
+ ln -fs $(LIBALME_NAME) libalme.so.$(LIBALME_VERSION_MSB))
+
+libalme: uclibc $(TARGET_DIR)/usr/lib/$(LIBALME_NAME)
+
+libalme-clean:
+ rm -f $(TARGET_DIR)/usr/lib/libalme.so
+ rm -f $(TARGET_DIR)/usr/lib/libalme.so.$(LIBALME_VERSION_MSB)
+ rm -f $(TARGET_DIR)/usr/lib/$(LIBALME_NAME)
+ -$(MAKE) -C $(LIBALME_DIR) clean
+
+libalme-dirclean:
+ rm -f $(LIBALME_DIR)
+
+# We declare FORCE_LIBALME_MAKE rule as PHONY to force compilation
+.PHONY: FORCE_LIBALME_MAKE
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_LIBALME)),y)
+TARGETS+=libalme
+endif