Add 5 example Makefiles: primitives, dilation, erosion, open, close.
[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 @cd $(SRC_DIR) && $(MAKE) opt # using ocamlopt
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 @cd $(SINWAVE_DIR) && $(MAKE)
40 @ls -l $(SINWAVE_DIR)/output1.wav
41
42 @echo " You might want to check the output file with either:"
43 @echo "audacity $(SINWAVE_DIR)/output1.wav"
44 @echo "open $(SINWAVE_DIR)/output1.wav"
45 @echo "octave -q --eval 'plot(wavread(\"$(SINWAVE_DIR)/output1.wav\")); pause'"
46
47 install :
48 mkdir -p $(prefix)/lib/faustine/
49 mkdir -p $(prefix)/bin/
50 install interpretor/faustine $(prefix)/bin/
51 install -m 0644 $(arch) $(prefix)/lib/faustine/
52
53 uninstall :
54 rm -rf $(prefix)/lib/faustine/
55 rm -f $(prefix)/bin/faustine