0bb0c69cb95b0144ad9786aefaf31e8e80edb3c1
4 # Try to guess the host system type and figure out platform specifics.
5 host
= $(shell ..
/..
/config.guess
)
6 ifneq "$(findstring -mingw,$(host))" ""
9 PDLIB
= -Wl
,--enable-auto-import
-lpd
11 ifneq "$(findstring x86_64-,$(host))" ""
12 # 64 bit, needs -fPIC flag
15 ifneq "$(findstring x86,$(host))" ""
16 # architecture-specific options for x86 and x86_64
17 EXTRA_CFLAGS
+= -msse
-ffast-math
20 # Try to figure out the Pd include directory.
21 pdincdir
= $(strip $(shell pkg-config pd
--cflags-only-I
2>/dev
/null
))
23 # Try some common locations.
24 pdincdir
= $(addprefix -I
,$(shell ls
-d
/usr
/local
/include/pdextended
/usr
/local
/include/pd
/usr
/include/pdextended
/usr
/include/pd
2>/dev
/null
))
26 EXTRA_CFLAGS
+= $(pdincdir
)
28 dspsrc
:= $(wildcard *.dsp
)
29 cppsrc
:= $(dspsrc
:.dsp
=.
cpp)
30 mods
:= $(dspsrc
:%.dsp
=%~
$(DLL
))
31 svg
:= $(dspsrc
:.dsp
=.svg
)
32 xml
:= $(dspsrc
:.dsp
=.dsp.xml
)
33 pd
:= $(dspsrc
:.dsp
=.pd
)
34 libs
:= $(wildcard *.lib
)
38 FAUST2PD
= ..
/..
/faust2pd
50 $(CXX
) $(shared
) $(EXTRA_CFLAGS
) $(CFLAGS
) -Dmydsp
=$(@
:%~
$(DLL
)=%) $< -o
$@
$(PDLIB
)
53 faust
$(VEC
) -a
$(ARCH
) $< -o
$@
56 faust
-svg
$< -o
/dev
/null
>/dev
/null
59 faust
-xml
$< -o
/dev
/null
62 $(FAUST2PD
) $(F2PDFLAGS
) $<
65 rm -f
$(mods
) *~
*.a
*.o
68 rm -f
$(mods
) $(cppsrc
) *~
*.a
*.o
83 rm -f
$(mods
) $(cppsrc
) $(xml
) $(pd
) *~
*.a
*.o