ok, I have this now working nicely with pd-lib-builder...
it already has detection for RPI2 etc, so basically all I need to do was detect it was 'bela', the best i could think of was to look at release. so here are the simple changes I made... (diff , so + means added line)
giuliomoro , do you think there is a better way to detect bela?
Ive created a fork of pd-lib-builder, if we have an agreed approach then I can issue a PR to add bela as a target
changes made to pd-lib-builder
pd-lib-builder/Makefile.pdlibbuilder
# Beagle, Udoo, RPi2 etc.
ifeq ($(machine), armv7l)
+release := $(shell uname -r)
+ifeq (`$(findstring $`(release), 3.8.13xenomai-bone41), $(release))
+ $(info bela build)
+ arch.c.flags = -march=armv7-a -mtune=cortex-a8 -mfloat-abi=hard -mfpu=neon -ftree-vectorize --fast-math
+else
arch.c.flags = -march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard
endif
+endif
then you can compile with this, to build and install it into the correct place for bela to pick it up.
make PDINCLUDEDIR=/usr/local/include/libpd/ PDLIBDIR=~/Bela/projects/pd-externals install
BTW... ive just noticed... if I'm powered off USB (connected to computer etc) its extremely noisy (unbearable), yet perfectly ok, if its power via 5v jack, normal?
Side note: not quite sure what the best approach for building externals for windows is...pd_lib_builder (& others) seem to use MinGW, which whilst they work, appear to mean you need to have MinGW installed/setup to use the external... since the generated dll is dependent on it. not really an issue for me, not really a big windows user 🙂