From: Karim Barkati Date: Thu, 12 Sep 2013 12:17:32 +0000 (+0200) Subject: Makefile and configure cleaning (configure is no more needed). X-Git-Url: https://svn.cri.ensmp.fr/git/Faustine.git/commitdiff_plain/056d65cce93f673551b565e7d11f196be2e8ec93?ds=sidebyside;hp=--cc Makefile and configure cleaning (configure is no more needed). --- 056d65cce93f673551b565e7d11f196be2e8ec93 diff --git a/.gitignore b/.gitignore index 8332efa..734c5ac 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,6 @@ interpretor/faustine interpretor/preprocessor/faust-0.9.47mr3/compiler/faust *.[oa] gmon.out -/Makefile *.svg *.cm[iox] *~ diff --git a/Makefile.in b/Makefile similarity index 89% rename from Makefile.in rename to Makefile index b370540..79e54a5 100644 --- a/Makefile.in +++ b/Makefile @@ -13,9 +13,7 @@ arch := $(wildcard architecture/*.*) all: $(EXEC) faustine: -# @cp $(SNDFILE_PATH)/sndfile_stub.o $(SRC_DIR) -## Using ocamlopt with 'make opt' - @cd $(SRC_DIR) && $(MAKE) opt #OCAML_INCLUDE_PATH=$(OCAML_INCLUDE_PATH) SNDFILE_PATH=$(SNDFILE_PATH) + @cd $(SRC_DIR) && $(MAKE) opt # using ocamlopt @cd $(SRC_DIR) && $(MAKE) clean .PHONY: clean mrproper test help install uninstall diff --git a/configure b/configure deleted file mode 100755 index 7eb8e79..0000000 --- a/configure +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash - -prefix="${PWD}" -INTERPRETOR_PATH="$prefix/interpretor" -PREPROCESSOR_PATH="$INTERPRETOR_PATH/preprocessor/faust-0.9.47mr3" -OCAML_INCLUDE_PATH_DEFAULT="/usr/lib/ocaml" -SNDFILE_PATH_DEFAULT="~/Desktop/libsndfile-ocaml" - -cd $PREPROCESSOR_PATH -make clean -cd $INTERPRETOR_PATH -make mrproper -cd $prefix - -echo "" -echo "1. Please set ocaml include header files' path: " -echo " [default]: $OCAML_INCLUDE_PATH_DEFAULT" -read -r OCAML_INCLUDE_PATH - -if [ -z $OCAML_INCLUDE_PATH ]; then - OCAML_INCLUDE_PATH=$OCAML_INCLUDE_PATH_DEFAULT -fi -echo "Ocaml include path : $OCAML_INCLUDE_PATH" - - -echo "" -echo "2. Please set libsndfile-ocaml path: " -echo " [default]: $SNDFILE_PATH_DEFAULT" -read -r SNDFILE_PATH - -if [ -z $SNDFILE_PATH ]; then - SNDFILE_PATH=$SNDFILE_PATH_DEFAULT -fi -echo "libsndfile-ocaml path : $SNDFILE_PATH" - -rm -f Makefile -cp Makefile.in Makefile -echo "OCAML_INCLUDE_PATH = $OCAML_INCLUDE_PATH" >> Makefile -echo "SNDFILE_PATH = $SNDFILE_PATH" >> Makefile - diff --git a/interpretor/Makefile b/interpretor/Makefile index 4a5f84f..30a10c9 100644 --- a/interpretor/Makefile +++ b/interpretor/Makefile @@ -13,7 +13,7 @@ EXEC = faustine OCAML_INCLUDE_PATH := $(subst bin,lib,$(shell which ocaml)) # Path to sndfile library -SNDFILE_PATH := lib/libsndfile +SNDFILE_PATH := lib/src/libsndfile-ocaml # Path to Faust.mr3 FAUST_PATH = preprocessor/faust-0.9.47mr3 @@ -54,6 +54,7 @@ LIBS = $(WITHSNDFILE) $(WITHUNIX) $(WITHSTR) # INCLUDE=-INCLUDE INCLUDE = -I $(SNDFILE_PATH) +SNDFILE_STUB := $(SNDFILE_PATH)/sndfile_stub.o # Default setting of the WITH* variables. Should be changed if your # local libraries are not found by the compiler. @@ -128,10 +129,12 @@ preprocessor:: $(EXEC): $(OBJS) $(COBJS) $(CLIBS) @echo "Compiling $(EXEC)..." + cp $(SNDFILE_STUB) . $(CAMLC) $(CAMLC_OPTIONS) -o $(EXEC) $(OBJS) $(COBJS) $(CLIBS) $(EXEC).opt: $(OPTOBJS) $(COBJS) $(CLIBS) @echo "Compiling optimized $(EXEC)..." + cp $(SNDFILE_STUB) . $(CAMLOPT) $(CAMLOPT_OPTIONS) -o $(EXEC) $(OPTOBJS) $(COBJS) $(CLIBS) document: $(SMLYL) $(OBJS) diff --git a/interpretor/lib/src/libsndfile-ocaml/Makefile b/interpretor/lib/src/libsndfile-ocaml/Makefile index 8df3b1e..442bf57 100644 --- a/interpretor/lib/src/libsndfile-ocaml/Makefile +++ b/interpretor/lib/src/libsndfile-ocaml/Makefile @@ -1,4 +1,4 @@ -LIBSNDFILEDIR = ../../libsndfile/lib #/home/erikd/Local/lib +LIBSNDFILEDIR = $(realpath ../../libsndfile/lib) CC = gcc CFLAGS = -g -W -Wall -Werror -Wno-missing-field-initializers @@ -13,7 +13,7 @@ SNDFILE_LIBS = $(shell pkg-config --libs sndfile) OCAML_BINDIR = $(shell which ocaml) OCAML_LIBDIR = $(subst bin,lib,$(OCAML_BINDIR)) -OCAML_CFLAGS = -I $(OCAML_LIBDIR) #/usr/lib/ocaml/$(shell ocamlopt -version) +OCAML_CFLAGS = -I $(OCAML_LIBDIR) LIBSNDFILE = -ccopt -L$(LIBSNDFILEDIR) -cclib -lsndfile -cclib -lm