# HG changeset patch # User Giulio Moro # Date 1461069964 -3600 # Node ID b0ad11ec5d5006ecf4e742783fb44c8f35e7389c # Parent 0357b8df93a5120567dca0c76fc00efb5eae2277 Updated Makefile to check for libpd diff -r 0357b8df93a5 -r b0ad11ec5d50 Makefile --- a/Makefile Mon Apr 18 03:22:04 2016 +0100 +++ b/Makefile Tue Apr 19 13:46:04 2016 +0100 @@ -8,7 +8,14 @@ RM := rm -rf STATIC_LIBS := ./libprussdrv.a ./libNE10.a -LIBS := -lrt -lnative -lxenomai -lsndfile -lpd +LIBS := -lrt -lnative -lxenomai -lsndfile +# refresh library cache and check if libpd is there +TEST_LIBPD := $(shell ldconfig; ldconfig -p | grep "libpd\.so") +ifeq ($(strip $(TEST_LIBPD)), ) +else +# if libpd is there, link it in + LIBS += -lpd -lpthread_rt +endif CPP_FLAGS := -O3 -march=armv7-a -mtune=cortex-a8 -mfloat-abi=hard -mfpu=neon -ftree-vectorize C_FLAGS := $(CPP_FLAGS) @@ -28,7 +35,7 @@ CC=clang CXX=clang++ CPP_FLAGS += - C _FLAGS += + C_FLAGS += else CC=gcc CXX=g++