summaryrefslogtreecommitdiffstats
path: root/package/libsndfile/libsndfile.mk
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2007-04-24 13:43:15 +0000
committerPeter Korsgaard <jacmet@sunsite.dk>2007-04-24 13:43:15 +0000
commitb33a6fb331bfe3eb31cc6f722b33d46995ead31e (patch)
treedfb1b8524948bba61fdc49810e134f10abeb95d0 /package/libsndfile/libsndfile.mk
parente92ad5bc97f8a39f4c78decc0b14af18025fbc30 (diff)
downloadbuildroot-novena-b33a6fb331bfe3eb31cc6f722b33d46995ead31e.tar.gz
buildroot-novena-b33a6fb331bfe3eb31cc6f722b33d46995ead31e.zip
libsndfile package. Closes #1325
Diffstat (limited to 'package/libsndfile/libsndfile.mk')
-rw-r--r--package/libsndfile/libsndfile.mk61
1 files changed, 61 insertions, 0 deletions
diff --git a/package/libsndfile/libsndfile.mk b/package/libsndfile/libsndfile.mk
new file mode 100644
index 000000000..1a451414d
--- /dev/null
+++ b/package/libsndfile/libsndfile.mk
@@ -0,0 +1,61 @@
+#############################################################
+#
+# libsndfile
+#
+#############################################################
+LIBSNDFILE_VER:=1.0.17
+LIBSNDFILE_SOURCE:=libsndfile-$(LIBSNDFILE_VER).tar.gz
+LIBSNDFILE_SITE:=http://www.mega-nerd.com/libsndfile/$(LIBUSB_SOURCE)
+LIBSNDFILE_DIR:=$(BUILD_DIR)/libsndfile-$(LIBSNDFILE_VER)
+LIBSNDFILE_BINARY:=libsndfile.sa
+LIBSNDFILE_TARGET_BINARY:=usr/lib/libsndfile.so
+
+$(DL_DIR)/$(LIBSNDFILE_SOURCE):
+ $(WGET) -P $(DL_DIR) $(LIBSNDFILE_SITE)/$(LIBSNDFILE_SOURCE)
+
+$(LIBSNDFILE_DIR)/.source: $(DL_DIR)/$(LIBSNDFILE_SOURCE)
+ $(ZCAT) $(DL_DIR)/$(LIBSNDFILE_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ toolchain/patch-kernel.sh $(LIBSNDFILE_DIR) package/libsndfile/ \*.patch
+ touch $(LIBSNDFILE_DIR)/.source
+
+$(LIBSNDFILE_DIR)/.configured: $(LIBSNDFILE_DIR)/.source
+ (cd $(LIBSNDFILE_DIR); \
+ $(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ ./configure \
+ --target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ );
+ touch $(LIBSNDFILE_DIR)/.configured;
+
+$(LIBSNDFILE_DIR)/$(LIBSNDFILE_BINARY): $(LIBSNDFILE_DIR)/.configured
+ $(MAKE) CC=$(TARGET_CC) -C $(LIBSNDFILE_DIR)
+
+$(TARGET_DIR)/$(LIBSNDFILE_TARGET_BINARY): $(LIBSNDFILE_DIR)/$(LIBSNDFILE_BINARY)
+ $(MAKE) prefix=$(TARGET_DIR)/usr -C $(LIBSNDFILE_DIR) install
+ rm -Rf $(TARGET_DIR)/usr/man
+
+libsndfile: uclibc $(TARGET_DIR)/$(LIBSNDFILE_TARGET_BINARY)
+
+libsndfile-source: $(DL_DIR)/$(LIBSNDFILE_SOURCE)
+
+libsndfile-clean:
+ $(MAKE) prefix=$(TARGET_DIR)/usr -C $(LIBSNDFILE_DIR) uninstall
+ -$(MAKE) -C $(LIBSNDFILE_DIR) clean
+
+libsndfile-dirclean:
+ rm -rf $(LIBSNDFILE_DIR)
+
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_LIBSNDFILE)),y)
+TARGETS+=libsndfile
+endif
+