From: Karim Barkati Date: Fri, 13 Sep 2013 14:48:20 +0000 (+0200) Subject: Makefiles chain, dependancies and libsndfile configure checked. X-Git-Url: https://svn.cri.ensmp.fr/git/Faustine.git/commitdiff_plain/1a54fb0c50310685e11123132e1fdcdf7ea2b5ad Makefiles chain, dependancies and libsndfile configure checked. --- diff --git a/Makefile b/Makefile index 9bebbd3..c558b8c 100644 --- a/Makefile +++ b/Makefile @@ -14,8 +14,7 @@ arch := $(wildcard architecture/*.*) all: $(EXEC) faustine: - @cd $(SRC_DIR) && $(MAKE) opt # using ocamlopt - @cd $(SRC_DIR) && $(MAKE) clean + $(MAKE) -C $(SRC_DIR) opt # using ocamlopt compiler (optimized) .PHONY: clean mrproper test help install uninstall @@ -28,15 +27,15 @@ help : @echo "make dist : make a tar.gz file ready for distribution (TODO)" clean: - @(cd $(SRC_DIR) && $(MAKE) clean) + @($(MAKE) -C $(SRC_DIR) clean) @(rm -f *~) mrproper: clean - @(cd $(SRC_DIR) && $(MAKE) mrproper) - @(cd $(PREPROCESSOR_DIR) && $(MAKE) clean) + @($(MAKE) -C $(SRC_DIR) mrproper) + @($(MAKE) -C $(PREPROCESSOR_DIR) clean) test: - @cd $(SINWAVE_DIR) && $(MAKE) + @$(MAKE) -C $(SINWAVE_DIR) @ls -l $(SINWAVE_DIR)/output1.wav @echo " You might want to check the output file with either:" diff --git a/configure b/configure new file mode 100755 index 0000000..ebb3976 --- /dev/null +++ b/configure @@ -0,0 +1,12 @@ +#! /bin/bash + +# libsndfile configure + +LIBSNDFILE_PREFIX=$PWD/interpretor/lib +LIBSNDFILE_SRCDIR=$LIBSNDFILE_PREFIX/src/libsndfile-1.0.25 +LIBSNDFILE_DESTNAME=libsndfile +DESTDIR=$LIBSNDFILE_PREFIX/$LIBSNDFILE_DESTNAME + +make mrproper +mkdir -p $DESTDIR +cd $LIBSNDFILE_SRCDIR && ./configure --prefix="$DESTDIR" --exec_prefix="$DESTDIR" diff --git a/interpretor/Makefile b/interpretor/Makefile index d7ec8b7..715aadc 100644 --- a/interpretor/Makefile +++ b/interpretor/Makefile @@ -130,11 +130,11 @@ MIDDLE_ML = $(PARSER_MLY:.mly=.ml) $(LEXER_MLL:.mll=.ml) preprocessor:: @echo "Compiling preprocessor..." - cd $(FAUST_PATH) && $(MAKE) + $(MAKE) -C $(FAUST_PATH) preprocessor libsndfile-ocaml:: @echo "Compiling libsndfile-ocaml..." - cd $(SNDFILE_PATH) && $(MAKE) + $(MAKE) -C $(SNDFILE_PATH) $(EXEC): $(OBJS) $(COBJS) $(CLIBS) @@ -213,12 +213,12 @@ faustio.cmx: faustio.ml clean:: rm -f *.cm[iox] *~ .*~ - rm -f $(MIDDLE_ML) *.o $(MLIS) .depend* - @cd $(SNDFILE_PATH) && $(MAKE) clean + rm -f $(MIDDLE_ML) *.o $(MLIS) # .depend* + @$(MAKE) -C $(SNDFILE_PATH) clean mrproper: clean - @cd $(SNDFILE_PATH) && $(MAKE) mrproper - rm -f $(EXEC)* + @$(MAKE) -C $(SNDFILE_PATH) mrproper + rm -f $(EXEC)* .depend* .depend.input: Makefile @echo -n '--Checking Ocaml input files: ' diff --git a/interpretor/lib/Makefile b/interpretor/lib/Makefile index 2ee772f..5c8d5ad 100644 --- a/interpretor/lib/Makefile +++ b/interpretor/lib/Makefile @@ -9,17 +9,14 @@ all: librairies librairies : libsndfile libsfocaml -libsndfile:: - mkdir -p $(DESTDIR) - cd $(LIBSNDFILE_SRCDIR) && ./configure --prefix="$(DESTDIR)" --exec_prefix="$(DESTDIR)" - cd $(LIBSNDFILE_SRCDIR) && make - cd $(LIBSNDFILE_SRCDIR) && make install - cd $(LIBSNDFILE_SRCDIR) && make clean - -libsfocaml:: +libsndfile: + $(MAKE) -C $(LIBSNDFILE_SRCDIR) + $(MAKE) -C $(LIBSNDFILE_SRCDIR) install + +libsfocaml: cd $(LIBSFOCAML_SRCDIR) && PKG_CONFIG_PATH=$(DESTDIR)/lib/pkgconfig - cd $(LIBSFOCAML_SRCDIR) && make depend - cd $(LIBSFOCAML_SRCDIR) && make + $(MAKE) -C $(LIBSFOCAML_SRCDIR) depend + $(MAKE) -C $(LIBSFOCAML_SRCDIR) .PHONY: clean mrproper help libsndfile libsfocaml @@ -28,9 +25,9 @@ help : @echo "make clean : remove all object files" clean: - @(cd $(LIBSNDFILE_SRCDIR) && $(MAKE) clean) @(rm -f *~) mrproper: clean rm -rf $(DESTDIR) - @(cd $(LIBSFOCAML_SRCDIR) && $(MAKE) clean) + @($(MAKE) -C $(LIBSNDFILE_SRCDIR) clean) + @($(MAKE) -C $(LIBSFOCAML_SRCDIR) clean) diff --git a/interpretor/preprocessor/faust-0.9.47mr3/Makefile b/interpretor/preprocessor/faust-0.9.47mr3/Makefile index 943df95..6008e3e 100644 --- a/interpretor/preprocessor/faust-0.9.47mr3/Makefile +++ b/interpretor/preprocessor/faust-0.9.47mr3/Makefile @@ -4,7 +4,7 @@ DESTDIR ?= PREFIX ?= /usr/local CROSS=i586-mingw32msvc- -MAKEFILE := Makefile.unix +MAKEFILE := Makefile #.unix prefix := $(DESTDIR)$(PREFIX) arch := $(wildcard architecture/*.*) @@ -12,6 +12,10 @@ mfiles := $(wildcard examples/Makefile.*) vname := faust-$(version)-$(shell date +%y%m%d.%H%M%S) zname := faust-$(version) + +preprocessor : + $(MAKE) -C compiler -f $(MAKEFILE) prefix=$(prefix) + all : $(MAKE) -C compiler -f $(MAKEFILE) prefix=$(prefix) $(MAKE) -C architecture/osclib diff --git a/interpretor/preprocessor/faust-0.9.47mr3/compiler/Makefile.unix b/interpretor/preprocessor/faust-0.9.47mr3/compiler/Makefile similarity index 99% rename from interpretor/preprocessor/faust-0.9.47mr3/compiler/Makefile.unix rename to interpretor/preprocessor/faust-0.9.47mr3/compiler/Makefile index 9188051..02ac902 100755 --- a/interpretor/preprocessor/faust-0.9.47mr3/compiler/Makefile.unix +++ b/interpretor/preprocessor/faust-0.9.47mr3/compiler/Makefile @@ -29,6 +29,7 @@ faust : $(objects) $(CXX) $(CXXFLAGS) $(objects) -o faust preprocess.a : $(libobjects) + rm -f preprocess.a # Avoid Mac OS aborting make with error "file too fat" ar rvs $@ $(libobjects) .PHONY: clean depend ctags parser