File: Make.size

package info (click to toggle)
faust 2.79.3%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 397,496 kB
  • sloc: cpp: 278,433; ansic: 116,164; javascript: 18,529; vhdl: 14,052; sh: 13,884; java: 5,900; objc: 3,852; python: 3,222; makefile: 2,655; cs: 1,672; lisp: 1,146; ruby: 954; yacc: 586; xml: 471; lex: 247; awk: 110; tcl: 26
file content (61 lines) | stat: -rw-r--r-- 2,279 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#
# Makefile for testing the faust OSC UI
#

system := $(shell uname -s)
system := $(shell echo $(system) | grep MINGW > /dev/null && echo MINGW || echo $(system))
ifeq ($(system), MINGW)
 FAUST ?= faust.exe
else
 FAUST ?= faust
endif
MAKE     ?= make
LIBDIR   ?= $(shell faust -libdir)
FAUSTINC ?= $(shell faust -includedir)
OSCLIB   ?= ../../architecture/osclib
version  := $(shell cat osc-version.txt)
size 	 ?= float

dspfiles  = $(shell find dsp -name "*.dsp")
outfiles  = $(dspfiles:dsp/%.dsp=$(version)/$(size)/%.ir.txt) $(dspfiles:dsp/%.dsp=$(version)/$(size)/%.ir.dyn.txt) 
OPTIONS  := -I$(FAUSTINC) -I$(OSCLIB)/oscpack 


#########################################################################
all: osclistener $(outfiles)

osclistener:
	$(MAKE) osclistener

help:
	@echo "-------- FAUST OSC UI tests --------"
	@echo "Available target are:"
	@echo " 'all' (default): build and run all the dsp found in the 'dsp' folder using an OSC UI"
	@echo "                  Each dsp is compiled twice: using the static and the dynamic OSC libs."
	@echo "                  The test sends the OSC messages taken from each corresponding dsp/*.osc.txt"
	@echo "                  while the application is running."
	@echo "                  It produces impulse response files on output, located in the $(version)/$(size) folder."
	@echo 
	@echo "Options:"
	@echo " 'size=[float|double]]': used for FAUSTFLOAT size (default is $(size)"


#########################################################################
# rules for ir output
$(version)/$(size)/%.ir.txt : $(version)/$(size)/% 
	./osclistener | grep -vi "version"  > $<.osc.txt &
	$< dsp/$(notdir $<).osc.txt | grep -vi "version" > $@ || (rm  $@; false)

$(version)/$(size)/%.ir.dyn.txt : $(version)/$(size)/%-dyn
	$(eval tmp := $(shell echo $< | sed 's/-dyn//'))
	$< dsp/$(notdir $(tmp)).osc.txt | grep -vi "version" > $@ || (rm  $@; false)

$(version)/$(size)/% : $(version)/$(size)/%.cpp
	$(CXX) $(OPTIONS) -DFAUSTFLOAT=$(size) $(LIBDIR)/libOSCFaust.a  $< -o $@

$(version)/$(size)/%-dyn : $(version)/$(size)/%.cpp
	$(CXX) $(OPTIONS) -DFAUSTFLOAT=$(size) -L$(LIBDIR) -lOSCFaust -rpath $(LIBDIR)  $< -o $@

$(version)/$(size)/%.cpp : dsp/%.dsp oscmin.cpp
	@[ -d $(@D) ] || mkdir -p $(@D)
	$(FAUST) -a oscmin.cpp  $<  -o $@