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 $@
|