Rename interpretor to interpreter.
[Faustine.git] / interpreter / lib / Makefile
diff --git a/interpreter/lib/Makefile b/interpreter/lib/Makefile
new file mode 100644 (file)
index 0000000..5c8d5ad
--- /dev/null
@@ -0,0 +1,33 @@
+# Faustine library dependancies Makefile.
+
+LIBSNDFILE_SRCDIR ?= src/libsndfile-1.0.25
+LIBSFOCAML_SRCDIR ?= src/libsndfile-ocaml
+LIBSNDFILE_DESTNAME ?= libsndfile
+DESTDIR := $(abspath .)/$(LIBSNDFILE_DESTNAME)
+
+all: librairies
+
+librairies : libsndfile libsfocaml
+
+libsndfile:
+       $(MAKE) -C $(LIBSNDFILE_SRCDIR)
+       $(MAKE) -C $(LIBSNDFILE_SRCDIR) install
+
+libsfocaml:
+       cd $(LIBSFOCAML_SRCDIR) && PKG_CONFIG_PATH=$(DESTDIR)/lib/pkgconfig
+       $(MAKE) -C $(LIBSFOCAML_SRCDIR) depend
+       $(MAKE) -C $(LIBSFOCAML_SRCDIR)
+
+.PHONY: clean mrproper help libsndfile libsfocaml
+
+help :
+       @echo "make or make all : compile librairies"
+       @echo "make clean : remove all object files"
+
+clean:
+       @(rm -f *~)
+
+mrproper: clean
+       rm -rf $(DESTDIR)
+       @($(MAKE) -C $(LIBSNDFILE_SRCDIR) clean)
+       @($(MAKE) -C $(LIBSFOCAML_SRCDIR) clean)