various performance and readability updates git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6234 818b1a75-f10b-46b9-bf7c-635c3b92a50f
58 lines
1.7 KiB
Plaintext
58 lines
1.7 KiB
Plaintext
CC = gcc
|
|
MPICC = gcc #mpicc
|
|
RM_F_V = rm -f -v
|
|
PWD = $(shell pwd)
|
|
export CC
|
|
export MPICC
|
|
export RM_F_V
|
|
export PWD
|
|
|
|
OBJS_DIR := $(PWD)/objs
|
|
|
|
SVN_REV := $(shell svnversion -n .)
|
|
DATE_REV := $(shell date '+%F %T')
|
|
|
|
NUM_CORES:=$(shell cat /proc/cpuinfo | grep processor | wc -l)
|
|
|
|
# Check for libraries and export cflags/linker variables
|
|
NETTLE_FOUND := $(shell if pkg-config --exists nettle; then echo "1" ; else echo "0"; fi)
|
|
ifeq ($(NETTLE_FOUND), 1)
|
|
NETTLE_LIBS := $(shell pkg-config --libs nettle)
|
|
endif
|
|
|
|
OPENSSL_FOUND := $(shell if pkg-config --exists openssl; then echo "1" ; else echo "0"; fi)
|
|
ifeq ($(OPENSSL_FOUND), 1)
|
|
OPENSSL_LIBS := $(shell pkg-config --libs openssl)
|
|
endif
|
|
|
|
PGM_FOUND := $(shell if pkg-config --exists openpgm-5.1; then echo "1" ; else echo "0"; fi)
|
|
ifeq ($(PGM_FOUND), 1)
|
|
PGM_CFLAGS := $(shell pkg-config --cflags openpgm-5.1)
|
|
PGM_LIBS := $(shell pkg-config --libs openpgm-5.1)
|
|
endif
|
|
|
|
LIBXML2_FOUND := $(shell if pkg-config --exists libxml-2.0; then echo "1" ; else echo "0"; fi)
|
|
ifeq ($(LIBXML2_FOUND), 1)
|
|
LIBXML2_CFLAGS := $(shell pkg-config --cflags libxml-2.0)
|
|
LIBXML2_LIBS := $(shell pkg-config --libs libxml-2.0)
|
|
endif
|
|
|
|
XPM_FOUND := $(shell if pkg-config --exists xpm; then echo "1" ; else echo "0"; fi)
|
|
ifeq ($(XPM_FOUND), 1)
|
|
XPM_LIBS := $(shell pkg-config --libs xpm)
|
|
endif
|
|
|
|
LIBBLAS_FOUND := $(shell if [ -f /usr/include/cblas.h ]; then echo "1"; else echo "0"; fi)
|
|
ifeq ($(LIBBLAS_FOUND), 1)
|
|
LIBBLAS_LIBS := -lblas
|
|
else
|
|
$(error "libblas not found, please install it")
|
|
endif
|
|
|
|
#Export common libs
|
|
LIBS = \
|
|
-lm \
|
|
$(LIBBLAS_LIBS) \
|
|
$(LIBXML2_LIBS) \
|
|
$(XPM_LIBS)
|