File: Makefile.qtcompile

package info (click to toggle)
jacktrip 1.0.5.patch2-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 748 kB
  • ctags: 473
  • sloc: cpp: 2,758; makefile: 86; sh: 26
file content (49 lines) | stat: -rw-r--r-- 1,218 bytes parent folder | download | duplicates (9)
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
###--------------------------------------------
### DEST : directory where to put binaries
### ARCH : faust architecture file

system	:= $(shell uname -s)
dspsrc  := $(wildcard *.dsp)
cppsrc  := $(addprefix $(DEST), $(dspsrc:.dsp=.cpp))


### check what type of applications to build (MacOSX Darwin or Linux)
ifeq ($(system), Darwin)
appls	:= $(addprefix $(DEST),  $(dspsrc:.dsp=.app))
else
appls	:= $(addprefix $(DEST),  $(dspsrc:.dsp=))
endif


TMP = /var/tmp/$(<:.dsp=)
###--------------------------------------------


all : $(appls)


### Darwin 
$(DEST)%.app : %.dsp
	rm -rf $(TMP)
	install -d $(TMP)
	faust -a $(ARCH) $< -o $(TMP)/$<.cpp
	cd $(TMP); qmake -project "INCLUDEPATH+=/usr/local/lib/faust/" "LIBS+=$(LIB)" "HEADERS+=/usr/local/lib/faust/faustqt.h" 
	cd $(TMP); qmake
	cd $(TMP); xcodebuild -project $(<:.dsp=).xcodeproj
	mv $(TMP)/build/Default/$(<:.dsp=.app) $@
	rm -rf $(TMP)


### Linux
$(DEST)% : %.dsp
	rm -rf $(TMP)
	install -d $(TMP)
	faust -a $(ARCH) $< -o $(TMP)/$<.cpp
	cd $(TMP); qmake -project "INCLUDEPATH+=/usr/local/lib/faust/" "LIBS+=$(LIB)" "HEADERS+=/usr/local/lib/faust/faustqt.h" 
	cd $(TMP); qmake 
	make -C $(TMP)
	mv $(TMP)/$(<:.dsp=) $@
	rm -rf $(TMP)

clean:
	rm -rf $(DEST)