File: Makefile.headers

package info (click to toggle)
jacktrip 2.7.1%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,788 kB
  • sloc: cpp: 44,373; sh: 965; makefile: 152; ansic: 32; ruby: 20; python: 15
file content (27 lines) | stat: -rw-r--r-- 1,058 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
dspsrc  := $(wildcard *.dsp)
headers  := $(addprefix $(DEST), $(dspsrc:.dsp=.h))

all :  $(headers)

FAUST = faust --inline-architecture-files --in-place
# --in-place (-inpl) means the input signal array can be used
#           as the output signal array in the compute() function.
# --inline-architecture-files (-i) means that all Faust headers
#           and include files get included in the output C++ file
#           so that it can be compiled without a Faust installation
#           on the compiling machine.

$(DEST)%.h : %.dsp
	$(FAUST) $(VEC) -cn $(<:.dsp=) -a $(ARCH) $< -o $(DEST)$(<:.dsp=).h
	#(cat $(@:.h=).cpp | sed -e s/mydsp/$(<:.dsp=)/g) > $@
	#/bin/rm $(@:.h=).cpp

# Probably needed for headers after the first: (cat $(@:.h=).cpp | sed -e /template/d | sed -e s/mydsp/$(<:.dsp=)/g) > $@

clean :
	rm -f $(DEST)

# Working example:
# lh limiterdsp.h: limiterdsp.dsp
#	faust -inpl -cn limiterdsp -a faust2header.cpp limiterdsp.dsp -o limiterdsp.cpp
#	(cat limiterdsp.cpp | sed -e /template/d | sed -e s/mydsp/limiterdsp/g) > limiterdsp.h