comparison Makefile @ 244:b0ad11ec5d50

Updated Makefile to check for libpd
author Giulio Moro <giuliomoro@yahoo.it>
date Tue, 19 Apr 2016 13:46:04 +0100
parents adfe95c3cd73
children feadb63cff32
comparison
equal deleted inserted replaced
243:0357b8df93a5 244:b0ad11ec5d50
6 # This Makefile is intended for use on the BeagleBone Black itself 6 # This Makefile is intended for use on the BeagleBone Black itself
7 # and not for cross-compiling 7 # and not for cross-compiling
8 8
9 RM := rm -rf 9 RM := rm -rf
10 STATIC_LIBS := ./libprussdrv.a ./libNE10.a 10 STATIC_LIBS := ./libprussdrv.a ./libNE10.a
11 LIBS := -lrt -lnative -lxenomai -lsndfile -lpd 11 LIBS := -lrt -lnative -lxenomai -lsndfile
12 # refresh library cache and check if libpd is there
13 TEST_LIBPD := $(shell ldconfig; ldconfig -p | grep "libpd\.so")
14 ifeq ($(strip $(TEST_LIBPD)), )
15 else
16 # if libpd is there, link it in
17 LIBS += -lpd -lpthread_rt
18 endif
12 19
13 CPP_FLAGS := -O3 -march=armv7-a -mtune=cortex-a8 -mfloat-abi=hard -mfpu=neon -ftree-vectorize 20 CPP_FLAGS := -O3 -march=armv7-a -mtune=cortex-a8 -mfloat-abi=hard -mfpu=neon -ftree-vectorize
14 C_FLAGS := $(CPP_FLAGS) 21 C_FLAGS := $(CPP_FLAGS)
15 22
16 ifndef COMPILER 23 ifndef COMPILER
26 33
27 ifeq ($(COMPILER), clang) 34 ifeq ($(COMPILER), clang)
28 CC=clang 35 CC=clang
29 CXX=clang++ 36 CXX=clang++
30 CPP_FLAGS += 37 CPP_FLAGS +=
31 C _FLAGS += 38 C_FLAGS +=
32 else 39 else
33 CC=gcc 40 CC=gcc
34 CXX=g++ 41 CXX=g++
35 CPP_FLAGS += --fast-math 42 CPP_FLAGS += --fast-math
36 C_FLAGS += --fast-math 43 C_FLAGS += --fast-math