libsndfile compiling.
[Faustine.git] / interpretor / lib / Makefile
diff --git a/interpretor/lib/Makefile b/interpretor/lib/Makefile
new file mode 100644 (file)
index 0000000..e249b40
--- /dev/null
@@ -0,0 +1,40 @@
+LIBSNDFILESRC := src/libsndfile-1.0.25
+prefix := libsndfile
+rootdir := $(abspath .)
+#TARGETDIR ?= ""
+#PREFIX ?= /usr/local
+#prefix := $(DESTDIR)$(PREFIX)
+#arch   := $(wildcard architecture/*.*)
+
+all: librairies
+
+librairies :: libsndfile
+#      @cp $(SNDFILE_PATH)/sndfile_stub.o $(SRC_DIR)
+#      @cd $(SRC_DIR) && $(MAKE) opt OCAML_INCLUDE_PATH=$(OCAML_INCLUDE_PATH) SNDFILE_PATH=$(SNDFILE_PATH)
+#      @cd $(SRC_DIR) && $(MAKE) clean
+
+libsndfile:
+       mkdir -p $(prefix)
+       cd $(LIBSNDFILESRC) && ./configure --prefix="$(rootdir)/$(prefix)" --exec_prefix="$(rootdir)/$(prefix)"
+       cd $(LIBSNDFILESRC) && make
+       cd $(LIBSNDFILESRC) && make install
+
+.PHONY: clean mrproper help libsndfile
+
+help :
+       @echo "make or make all : compile librairies"
+       @echo "make clean : remove all object files"
+
+clean:
+       @(cd $(LIBSNDFILESRC) && $(MAKE) clean)
+       @(rm -f *~)
+
+mrproper: clean
+       @(cd $(LIBSNDFILESRC) && $(MAKE) clean)
+
+
+# Library paths for OCaml and libsndfile-ocaml
+# OCAML_INCLUDE_PATH
+# SNDFILE_PATH
+OCAML_INCLUDE_PATH = /usr/local/lib/ocaml
+SNDFILE_PATH = /Users/karimbarkati/Boulot/2013-07-CRI/Interpretor/libsndfile-ocaml