Update readme, install and license files.
[Faustine.git] / Makefile
1 # Faustine top-level Makefile.
2
3 EXEC = faustine
4 SRC_DIR = interpretor
5 PREPROCESSOR_DIR = $(SRC_DIR)/preprocessor/faust-0.9.47mr3
6 EXAMPLES_DIR = examples
7 SINWAVE_DIR = $(EXAMPLES_DIR)/sinwave
8
9 DESTDIR ?=
10 PREFIX ?= /usr/local
11 prefix := $(DESTDIR)$(PREFIX)
12 arch := $(wildcard architecture/*.*)
13
14 all: $(EXEC)
15
16 faustine:
17 $(MAKE) -C $(SRC_DIR) opt # using ocamlopt compiler (optimized)
18
19 .PHONY: clean mrproper test help install uninstall
20
21 help :
22 @echo "make or make all : compiler the faustine interpreter"
23 @echo "make clean : remove all object files"
24 @echo "make doc : generate the documentation using ocamldoc (TODO)"
25 @echo "make install : install the interpreter and the library files in $(prefix)/bin $(prefix)/lib/faustine"
26 @echo "make uninstall : undo what install did"
27 @echo "make dist : make a tar.gz file ready for distribution (TODO)"
28
29 clean:
30 @($(MAKE) -C $(SRC_DIR) clean)
31 @(rm -f *~)
32
33 mrproper: clean
34 @($(MAKE) -C $(SRC_DIR) mrproper)
35 @($(MAKE) -C $(PREPROCESSOR_DIR) clean)
36
37 test:
38 @$(MAKE) -C $(SINWAVE_DIR)
39 @ls -l $(SINWAVE_DIR)/output1.wav
40
41 @echo " You might want to check the output file with either:"
42 @echo "audacity $(SINWAVE_DIR)/output1.wav"
43 @echo "open $(SINWAVE_DIR)/output1.wav"
44 @echo "octave -q --eval 'plot(wavread(\"$(SINWAVE_DIR)/output1.wav\")); pause'"
45
46 install :
47 mkdir -p $(prefix)/lib/faustine/
48 mkdir -p $(prefix)/bin/
49 install interpretor/faustine $(prefix)/bin/
50 install -m 0644 $(arch) $(prefix)/lib/faustine/
51
52 uninstall :
53 rm -rf $(prefix)/lib/faustine/
54 rm -f $(prefix)/bin/faustine