Refactoring of Signal class by adding a rate class.
[Faustine.git] / Makefile.in
1 SRC_DIR = interpretor
2 PREPROCESSOR_DIR = $(SRC_DIR)/preprocessor/faust-0.9.47mr3
3 OUTPUTSOUNDS_DIR = examples/output_sounds
4 EXEC = faustine
5
6 DESTDIR ?=
7 PREFIX ?= /usr/local
8 CROSS=i586-mingw32msvc-
9
10 prefix := $(DESTDIR)$(PREFIX)
11 arch := $(wildcard architecture/*.*)
12
13 all: $(EXEC)
14
15 faustine:
16 @cp $(SNDFILE_PATH)/sndfile_stub.o $(SRC_DIR)
17 @cd $(SRC_DIR) && $(MAKE) opt OCAML_INCLUDE_PATH=$(OCAML_INCLUDE_PATH) SNDFILE_PATH=$(SNDFILE_PATH)
18 @cd $(SRC_DIR) && $(MAKE) clean
19
20 .PHONY: clean mrproper test help install uninstall
21
22 help :
23 @echo "make or make all : compiler the faustine interpreter"
24 @echo "make clean : remove all object files"
25 @echo "make doc : generate the documentation using ocamldoc (TODO)"
26 @echo "make install : install the interpreter and the library files in $(prefix)/bin $(prefix)/lib/faustine"
27 @echo "make uninstall : undo what install did"
28 @echo "make dist : make a tar.gz file ready for distribution (TODO)"
29
30 clean:
31 @(cd $(SRC_DIR) && $(MAKE) clean)
32 @(rm -f *~)
33
34 mrproper: clean
35 @(cd $(SRC_DIR) && $(MAKE) mrproper)
36 @(cd $(PREPROCESSOR_DIR) && $(MAKE) clean)
37
38 test:
39 @rm -f $(OUTPUTSOUNDS_DIR)/output0.wav
40 @cd $(SRC_DIR) && ./faustine -d ../dsp_files/sin.dsp
41 @ls -l $(OUTPUTSOUNDS_DIR)/output0.wav
42
43 @echo " You might want to check the output file with either:"
44 @echo "audacity ../examples/output_sounds/output0.wav"
45 @echo "open ../examples/output_sounds/output0.wav"
46 @echo "octave -q --eval 'plot(wavread(\"../examples/output_sounds/output0.wav\")); pause'"
47
48 install :
49 mkdir -p $(prefix)/lib/faustine/
50 mkdir -p $(prefix)/bin/
51 install interpretor/faustine $(prefix)/bin/
52 install -m 0644 $(arch) $(prefix)/lib/faustine/
53
54 uninstall :
55 rm -rf $(prefix)/lib/faustine/
56 rm -f $(prefix)/bin/faustine
57
58
59 # Library paths for OCaml and libsndfile-ocaml
60 # OCAML_INCLUDE_PATH
61 # SNDFILE_PATH