Commit 9379bc6e authored by thomasl's avatar thomasl

fix depandancy issue that make make to fail first time

various performance and readability updates



git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6234 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 6234b0f2
...@@ -3,6 +3,7 @@ CC=gcc ...@@ -3,6 +3,7 @@ CC=gcc
CCC=gcc CCC=gcc
linux := $(shell if [ `uname` = "Linux" ] ; then echo "1" ; else echo "0" ; fi) linux := $(shell if [ `uname` = "Linux" ] ; then echo "1" ; else echo "0" ; fi)
#CFLAGS += -std=gnu99 #CFLAGS += -std=gnu99
CFLAGS += -Wall -g -ggdb -Wstrict-prototypes -fno-strict-aliasing -rdynamic CFLAGS += -Wall -g -ggdb -Wstrict-prototypes -fno-strict-aliasing -rdynamic
......
...@@ -115,6 +115,9 @@ $(S1AP_GENERATED): %.o : %.c ...@@ -115,6 +115,9 @@ $(S1AP_GENERATED): %.o : %.c
sed -e 's/^ *//' -e 's/$$/:/' >> $(basename $@).d sed -e 's/^ *//' -e 's/$$/:/' >> $(basename $@).d
@rm -f $(basename $@).d.tmp @rm -f $(basename $@).d.tmp
$(OUTDIR)/%.c : $(OUTDIR)/s1ap_ieregen.stamp $(OUTDIR)/s1ap_asn1regen.stamp
@if [ -f $< ] ; then touch $<; else echo "ERROR: " $< "not generated" ; exit 1 ; fi;
$(OUTDIR)/s1ap_ieregen.stamp: $(ASN1DIR)/$(ASN1RELDIR)/S1AP-PDU-Contents.asn $(ASN1DIR)/asn1tostruct.py $(OUTDIR)/s1ap_ieregen.stamp: $(ASN1DIR)/$(ASN1RELDIR)/S1AP-PDU-Contents.asn $(ASN1DIR)/asn1tostruct.py
@if [ ! -d $(OUTDIR) ]; then mkdir -p $(OUTDIR); fi; @if [ ! -d $(OUTDIR) ]; then mkdir -p $(OUTDIR); fi;
@python $(ASN1DIR)/asn1tostruct.py -f$< -o$(OUTDIR) @python $(ASN1DIR)/asn1tostruct.py -f$< -o$(OUTDIR)
......
export IS_REL10_CBA=$(shell \ current_release_asn1_module=$(substr $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1c/ASN1_files/.lock-,, $(wildcard $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1c/ASN1_files/.lock-*))
if [ -f $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1c/ASN1_files/.lock-rel10-cba ] ; then \
echo "1" ; else echo "0" ; fi)
export IS_REL10=$(shell \
if [ -f $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1c/ASN1_files/.lock-rel10 ] ; then \
echo "1" ; else echo "0" ; fi)
export IS_REL8=$(shell \
if [ -f $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1c/ASN1_files/.lock-rel8 ] ; then \
echo "1" ; else echo "0" ; fi)
print-%:
@echo '$*=$($*)'
ifdef CBA ifdef CBA
CFLAGS += -DRel10 CFLAGS += -DRel10
CFLAGS += -DCBA CFLAGS += -DCBA
ifneq ($(current_release_asn1_module), rel10-cba)
ifeq ($(IS_REL10_CBA), 0) tmp3:=$(shell cd $(OPENAIR2_DIR)/RRC/LITE/MESSAGES ;\
tmp3:=$(shell cd $(OPENAIR2_DIR)/RRC/LITE/MESSAGES ; \ rm -f ${ASN_MODULE_SOURCES} $(ASN_MODULE_HEADERS) *.o *.d ;\
rm -f ${ASN_MODULE_SOURCES} $(ASN_MODULE_HEADERS) *.o *.d ) cd $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1c/ASN1_files/ ;\
tmp2:=$(shell cd $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1c/ASN1_files/ ; \ rm EUTRA-RRC-Definitions.asn ;\
rm EUTRA-RRC-Definitions.asn ; \
ln -s EUTRA-RRC-Definitions-a20-lola.asn EUTRA-RRC-Definitions.asn ; \ ln -s EUTRA-RRC-Definitions-a20-lola.asn EUTRA-RRC-Definitions.asn ; \
cd $(OPENAIR_TARGETS)/SIMU/USER/ ; \ cd $(OPENAIR_TARGETS)/SIMU/USER/ ;\
rm -f $(ASN1_MSG_OBJS1) ; \ rm -f $(ASN1_MSG_OBJS1) ;\
rm -f $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/Makefile.inc.generated ; \ rm -f $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/Makefile.inc.generated ;\
rm -f $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/Makefile.am.sample ; \ rm -f $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/Makefile.am.sample ;\
rm -f $(L2_OBJS) ; \ rm -f $(L2_OBJS) ;\
rm -f *.o ; \ rm -f *.o ;\
rm -f oaisim ; \ rm -f oaisim ;\
touch $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1c/ASN1_files/.lock-rel10-cba ; \ rm -f $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1c/ASN1_files/.lock-* ;\
rm -f $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1c/ASN1_files/.lock-rel8 ; \ touch $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1c/ASN1_files/.lock-rel10-cba ;\
rm -f $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1c/ASN1_files/.lock-rel10 ; \ /bin/bash $(OPENAIR_TARGETS)/SCRIPTS/asn1_generate_rrc_messaging_c_code.bash ;\
/bin/bash $(OPENAIR_TARGETS)/SCRIPTS/asn1_generate_rrc_messaging_c_code.bash \ cd $(OPENAIR2_DIR)/RRC/LITE/MESSAGES ;\
)
tmp:=$(shell cd $(OPENAIR2_DIR)/RRC/LITE/MESSAGES ; \
awk '/converter-sample.c/ {exit} // {print}' Makefile.am.sample > Makefile.inc.generated ) awk '/converter-sample.c/ {exit} // {print}' Makefile.am.sample > Makefile.inc.generated )
endif endif
else ifdef Rel10 else ifdef Rel10
CFLAGS += -DRel10 CFLAGS += -DRel10
ifeq ($(IS_REL10), 0) ifneq ($(current_release_asn1_module), rel10)
tmp3:=$(shell cd $(OPENAIR2_DIR)/RRC/LITE/MESSAGES ; \ tmp3:=$(shell cd $(OPENAIR2_DIR)/RRC/LITE/MESSAGES ;\
rm -f ${ASN_MODULE_SOURCES} $(ASN_MODULE_HEADERS) *.o *.d ) rm -f ${ASN_MODULE_SOURCES} $(ASN_MODULE_HEADERS) *.o *.d ;\
tmp2:=$(shell cd $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1c/ASN1_files/ ; \ cd $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1c/ASN1_files/ ;\
rm EUTRA-RRC-Definitions.asn ; \ rm EUTRA-RRC-Definitions.asn ;\
ln -s EUTRA-RRC-Definitions-a20.asn EUTRA-RRC-Definitions.asn ; \ ln -s EUTRA-RRC-Definitions-a20.asn EUTRA-RRC-Definitions.asn ;\
cd $(OPENAIR_TARGETS)/SIMU/USER/ ; \ cd $(OPENAIR_TARGETS)/SIMU/USER/ ;\
rm -f $(ASN1_MSG_OBJS1) ; \ rm -f $(ASN1_MSG_OBJS1) ;\
rm -f $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/Makefile.inc.generated ; \ rm -f $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/Makefile.inc.generated ;\
rm -f $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/Makefile.am.sample ; \ rm -f $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/Makefile.am.sample ;\
rm -f $(L2_OBJS) ; \ rm -f $(L2_OBJS) ;\
rm -f *.o ; \ rm -f *.o ;\
rm -f oaisim ; \ rm -f oaisim ;\
touch $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1c/ASN1_files/.lock-rel10 ; \ rm -f $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1c/ASN1_files/.lock-* ;\
rm -f $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1c/ASN1_files/.lock-rel8 ; \ touch $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1c/ASN1_files/.lock-rel10 ;\
rm -f $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1c/ASN1_files/.lock-rel10-cba ; \ /bin/bash $(OPENAIR_TARGETS)/SCRIPTS/asn1_generate_rrc_messaging_c_code.bash ;\
/bin/bash $(OPENAIR_TARGETS)/SCRIPTS/asn1_generate_rrc_messaging_c_code.bash \ cd $(OPENAIR2_DIR)/RRC/LITE/MESSAGES ;\
)
tmp:=$(shell cd $(OPENAIR2_DIR)/RRC/LITE/MESSAGES ; \
awk '/converter-sample.c/ {exit} // {print}' Makefile.am.sample > Makefile.inc.generated ) awk '/converter-sample.c/ {exit} // {print}' Makefile.am.sample > Makefile.inc.generated )
endif endif
else # default is rel 8 else # default is rel 8
CFLAGS += -DRel8 CFLAGS += -DRel8
ifeq ($(IS_REL8), 0) ifneq ($(current_release_asn1_module), rel8)
tmp3:=$(shell cd $(OPENAIR2_DIR)/RRC/LITE/MESSAGES ; \ tmp3:=$(shell cd $(OPENAIR2_DIR)/RRC/LITE/MESSAGES ;\
rm -f ${ASN_MODULE_SOURCES} $(ASN_MODULE_HEADERS) *.o *.d ) rm -f ${ASN_MODULE_SOURCES} $(ASN_MODULE_HEADERS) *.o *.d ;\
tmp2:=$(shell cd $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1c/ASN1_files/ ; \ cd $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1c/ASN1_files/ ;\
rm EUTRA-RRC-Definitions.asn ; \ rm EUTRA-RRC-Definitions.asn ;\
ln -s EUTRA-RRC-Definitions-86.asn EUTRA-RRC-Definitions.asn ; \ ln -s EUTRA-RRC-Definitions-86.asn EUTRA-RRC-Definitions.asn ;\
cd $(OPENAIR_TARGETS)/SIMU/USER/ ; \ cd $(OPENAIR_TARGETS)/SIMU/USER/ ;\
rm -f $(ASN1_MSG_OBJS1) ; \ rm -f $(ASN1_MSG_OBJS1) ;\
rm -f $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/Makefile.inc.generated ; \ rm -f $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/Makefile.inc.generated ;\
rm -f $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/Makefile.am.sample ; \ rm -f $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/Makefile.am.sample ;\
rm -f $(L2_OBJS); \ rm -f $(L2_OBJS);\
rm -f *.o ; \ rm -f *.o ;\
rm -f oaisim ; \ rm -f oaisim ;\
touch $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1c/ASN1_files/.lock-rel8 ; \ rm -f $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1c/ASN1_files/.lock-* ;\
rm -f $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1c/ASN1_files/.lock-rel10 ; \ touch $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1c/ASN1_files/.lock-rel8 ;\
rm -f $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1c/ASN1_files/.lock-rel10-cba ; \ /bin/bash $(OPENAIR_TARGETS)/SCRIPTS/asn1_generate_rrc_messaging_c_code.bash ;\
/bin/bash $(OPENAIR_TARGETS)/SCRIPTS/asn1_generate_rrc_messaging_c_code.bash \ cd $(OPENAIR2_DIR)/RRC/LITE/MESSAGES ;\
)
tmp:=$(shell cd $(OPENAIR2_DIR)/RRC/LITE/MESSAGES ; \
awk '/converter-sample.c/ {exit} // {print}' Makefile.am.sample > Makefile.inc.generated ) awk '/converter-sample.c/ {exit} // {print}' Makefile.am.sample > Makefile.inc.generated )
endif endif
endif endif
tmp:=$(shell cd $(OPENAIR2_DIR)/RRC/LITE/MESSAGES ; \ tmp:=$(shell cd $(OPENAIR2_DIR)/RRC/LITE/MESSAGES ;\
if [ ! -s Makefile.am.sample ] ; then \ if [ ! -s Makefile.am.sample ] ; then \
/bin/bash $(OPENAIR_TARGETS)/SCRIPTS/asn1_generate_rrc_messaging_c_code.bash ;\ /bin/bash $(OPENAIR_TARGETS)/SCRIPTS/asn1_generate_rrc_messaging_c_code.bash ;\
fi; \ fi ;\
if [ ! -s Makefile.inc.generated ] ; then \ if [ ! -s Makefile.inc.generated ] ; then \
awk '/converter-sample.c/ {exit} // {print}' Makefile.am.sample > Makefile.inc.generated ; \ awk '/converter-sample.c/ {exit} // {print}' Makefile.am.sample > Makefile.inc.generated ;\
fi ) fi )
include $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/Makefile.inc.generated include $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/Makefile.inc.generated
......
CCC = gcc CCC = gcc
#include $(OPENAIR_HOME)/common/utils/Makefile.inc include $(OPENAIR_HOME)/common/utils/Makefile.inc
KERNEL_MAIN_TYPE=$(shell echo `uname -r | cut -d. -f-2 | tr "." "_"`) KERNEL_MAIN_TYPE:=$(shell echo `uname -r | cut -d. -f-2 | tr "." "_"`)
export KERNEL_MAIN_TYPE export KERNEL_MAIN_TYPE
EXTRA_CFLAGS = -ggdb -D__KERNEL__ -DMODULE -D_LOOSE_KERNEL_NAMES -I$(KERNEL_DIR)/build/include -I$(KERNEL_DIR)/build/include/asm/mach-default -include $(KERNEL_DIR)/build/include/linux/autoconf.h EXTRA_CFLAGS = -ggdb -D__KERNEL__ -DMODULE -D_LOOSE_KERNEL_NAMES -I$(KERNEL_DIR)/build/include -I$(KERNEL_DIR)/build/include/asm/mach-default -include $(KERNEL_DIR)/build/include/linux/autoconf.h
EXTRA_CFLAGS += -I$(PWD)/../../DEFS EXTRA_CFLAGS += -I$(PWD)/../../DEFS
ccflags-y= $(CFLAGS) $(EXTRA_CFLAGS)
CFLAGS=
obj-m += openair_rf.o obj-m += openair_rf.o
openair_rf-objs += module_main.o irq.o fileops.o exmimo_fw.o openair_rf-objs += module_main.o irq.o fileops.o exmimo_fw.o
......
# This file gathers compilation directive shared between lte-softmodem and oaisim # This file gathers compilation directive shared between lte-softmodem and oaisim
COMMON_UTILS_DIR = $(OPENAIR_HOME)/common/utils export COMMON_UTILS_DIR = $(OPENAIR_HOME)/common/utils
UE_NAS_DIR = $(OPENAIR_HOME)/openair-cn/NAS export UE_NAS_DIR = $(OPENAIR_HOME)/openair-cn/NAS
S1AP_DIR = $(OPENAIR_HOME)/openair-cn/S1AP export S1AP_DIR = $(OPENAIR_HOME)/openair-cn/S1AP
X2AP_DIR = $(OPENAIR_HOME)/openair2/X2AP export X2AP_DIR = $(OPENAIR_HOME)/openair2/X2AP
SCTP_DIR = $(OPENAIR_HOME)/openair-cn/SCTP export SCTP_DIR = $(OPENAIR_HOME)/openair-cn/SCTP
UDP_DIR = $(OPENAIR_HOME)/openair-cn/UDP export UDP_DIR = $(OPENAIR_HOME)/openair-cn/UDP
GTPV1U_DIR = $(OPENAIR_HOME)/openair-cn/GTPV1-U export GTPV1U_DIR = $(OPENAIR_HOME)/openair-cn/GTPV1-U
SECU_DIR = $(OPENAIR_HOME)/openair-cn/SECU export SECU_DIR = $(OPENAIR_HOME)/openair-cn/SECU
UE_NAS_OBJ_DIR = $(subst $(OPENAIR_HOME),$(OBJS_DIR),$(UE_NAS_DIR)) UE_NAS_OBJ_DIR = $(subst $(OPENAIR_HOME),$(OBJS_DIR),$(UE_NAS_DIR))
SECU_OBJ_DIR = $(subst $(OPENAIR_HOME),$(OBJS_DIR),$(SECU_DIR)) SECU_OBJ_DIR = $(subst $(OPENAIR_HOME),$(OBJS_DIR),$(SECU_DIR))
...@@ -16,15 +16,6 @@ SCTP_OBJ_DIR = $(subst $(OPENAIR_HOME),$(OBJS_DIR),$(SCTP_DIR)) ...@@ -16,15 +16,6 @@ SCTP_OBJ_DIR = $(subst $(OPENAIR_HOME),$(OBJS_DIR),$(SCTP_DIR))
UDP_OBJ_DIR = $(subst $(OPENAIR_HOME),$(OBJS_DIR),$(UDP_DIR)) UDP_OBJ_DIR = $(subst $(OPENAIR_HOME),$(OBJS_DIR),$(UDP_DIR))
GTPV1U_OBJ_DIR = $(subst $(OPENAIR_HOME),$(OBJS_DIR),$(GTPV1U_DIR)) GTPV1U_OBJ_DIR = $(subst $(OPENAIR_HOME),$(OBJS_DIR),$(GTPV1U_DIR))
export COMMON_UTILS_DIR
export UE_NAS_DIR
export S1AP_DIR
export X2AP_DIR
export SCTP_DIR
export UDP_DIR
export GTPV1U_DIR
export SECU_DIR
#Export common cflags (between softmodem and oaisim) #Export common cflags (between softmodem and oaisim)
COMMON_CFLAGS = \ COMMON_CFLAGS = \
-D'FIRMWARE_VERSION="$(SVN_REV) - $(DATE_REV)"' \ -D'FIRMWARE_VERSION="$(SVN_REV) - $(DATE_REV)"' \
...@@ -43,11 +34,11 @@ include $(OPENAIR2_DIR)/NAS/Makefile.inc ...@@ -43,11 +34,11 @@ include $(OPENAIR2_DIR)/NAS/Makefile.inc
ifeq ($(SECU), 1) ifeq ($(SECU), 1)
ifeq ($(NETTLE_FOUND), 0) ifeq ($(NETTLE_FOUND), 0)
@echo "Nettle library >= 2.5 is not installed on your system, nettle-dev lib needed, continuing with security disabled" @(warning "Nettle library >= 2.5 is not installed on your system, nettle-dev lib needed, continuing with security disabled")
SECU=0 SECU=0
else else
ifeq ($(OPENSSL_FOUND), 0) ifeq ($(OPENSSL_FOUND), 0)
@echo "openssl library is not installed on your system, openssl lib needed, continuing with security disabled" @(warning "openssl library is not installed on your system, openssl lib needed, continuing with security disabled")
SECU=0 SECU=0
else else
CFLAGS += -DENABLE_SECURITY CFLAGS += -DENABLE_SECURITY
...@@ -111,7 +102,7 @@ endif ...@@ -111,7 +102,7 @@ endif
COMMON_CFLAGS += -DLOG_NO_THREAD COMMON_CFLAGS += -DLOG_NO_THREAD
#-DEMIT_ASN_DEBUG #-DEMIT_ASN_DEBUG
openair_cn_available = $(shell if [ -d "$(UE_NAS_DIR)" ]; then echo "0" ; else echo "1" ; fi ) openair_cn_available := $(shell if [ -d "$(UE_NAS_DIR)" ]; then echo "0" ; else echo "1" ; fi )
ifeq ($(openair_cn_available), 0) ifeq ($(openair_cn_available), 0)
COMMON_CFLAGS += -DENABLE_NAS_UE_LOGGING COMMON_CFLAGS += -DENABLE_NAS_UE_LOGGING
COMMON_CFLAGS += -I$(OPENAIR_HOME)/openair-cn/NAS/EURECOM-NAS/src/api/network COMMON_CFLAGS += -I$(OPENAIR_HOME)/openair-cn/NAS/EURECOM-NAS/src/api/network
......
...@@ -15,38 +15,38 @@ DATE_REV := $(shell date '+%F %T') ...@@ -15,38 +15,38 @@ DATE_REV := $(shell date '+%F %T')
NUM_CORES:=$(shell cat /proc/cpuinfo | grep processor | wc -l) NUM_CORES:=$(shell cat /proc/cpuinfo | grep processor | wc -l)
# Check for libraries and export cflags/linker variables # Check for libraries and export cflags/linker variables
NETTLE_FOUND = $(shell if pkg-config --exists nettle; then echo "1" ; else echo "0"; fi) NETTLE_FOUND := $(shell if pkg-config --exists nettle; then echo "1" ; else echo "0"; fi)
ifeq ($(NETTLE_FOUND), 1) ifeq ($(NETTLE_FOUND), 1)
NETTLE_LIBS = `pkg-config --libs nettle` NETTLE_LIBS := $(shell pkg-config --libs nettle)
endif endif
OPENSSL_FOUND = $(shell if pkg-config --exists openssl; then echo "1" ; else echo "0"; fi) OPENSSL_FOUND := $(shell if pkg-config --exists openssl; then echo "1" ; else echo "0"; fi)
ifeq ($(OPENSSL_FOUND), 1) ifeq ($(OPENSSL_FOUND), 1)
OPENSSL_LIBS = `pkg-config --libs openssl` OPENSSL_LIBS := $(shell pkg-config --libs openssl)
endif endif
PGM_FOUND = $(shell if pkg-config --exists openpgm-5.1; then echo "1" ; else echo "0"; fi) PGM_FOUND := $(shell if pkg-config --exists openpgm-5.1; then echo "1" ; else echo "0"; fi)
ifeq ($(PGM_FOUND), 1) ifeq ($(PGM_FOUND), 1)
PGM_CFLAGS = `pkg-config --cflags openpgm-5.1` PGM_CFLAGS := $(shell pkg-config --cflags openpgm-5.1)
PGM_LIBS = `pkg-config --libs openpgm-5.1` PGM_LIBS := $(shell pkg-config --libs openpgm-5.1)
endif endif
LIBXML2_FOUND = $(shell if pkg-config --exists libxml-2.0; then echo "1" ; else echo "0"; fi) LIBXML2_FOUND := $(shell if pkg-config --exists libxml-2.0; then echo "1" ; else echo "0"; fi)
ifeq ($(LIBXML2_FOUND), 1) ifeq ($(LIBXML2_FOUND), 1)
LIBXML2_CFLAGS = `pkg-config --cflags libxml-2.0` LIBXML2_CFLAGS := $(shell pkg-config --cflags libxml-2.0)
LIBXML2_LIBS = `pkg-config --libs libxml-2.0` LIBXML2_LIBS := $(shell pkg-config --libs libxml-2.0)
endif endif
XPM_FOUND = $(shell if pkg-config --exists xpm; then echo "1" ; else echo "0"; fi) XPM_FOUND := $(shell if pkg-config --exists xpm; then echo "1" ; else echo "0"; fi)
ifeq ($(XPM_FOUND), 1) ifeq ($(XPM_FOUND), 1)
XPM_LIBS = `pkg-config --libs xpm` XPM_LIBS := $(shell pkg-config --libs xpm)
endif endif
LIBBLAS_FOUND = $(shell if [ -f /usr/include/cblas.h ]; then echo "1"; else echo "0"; fi) LIBBLAS_FOUND := $(shell if [ -f /usr/include/cblas.h ]; then echo "1"; else echo "0"; fi)
ifeq ($(LIBBLAS_FOUND), 1) ifeq ($(LIBBLAS_FOUND), 1)
LIBBLAS_LIBS = -lblas LIBBLAS_LIBS := -lblas
else else
echo "libblas not found, please install it" $(error "libblas not found, please install it")
endif endif
#Export common libs #Export common libs
......
...@@ -10,6 +10,8 @@ KERNEL_VERSION:=$(shell echo `uname -r | cut -d. -f-2`) ...@@ -10,6 +10,8 @@ KERNEL_VERSION:=$(shell echo `uname -r | cut -d. -f-2`)
KERNEL_TYPE:=$(shell echo `uname -r | cut -d. -f-3 | cut -d- -f3`) KERNEL_TYPE:=$(shell echo `uname -r | cut -d. -f-3 | cut -d- -f3`)
LOWLATENCY_KERNEL:=$(shell if [ $(KERNEL_TYPE) = "lowlatency" ]; then echo "1" ; else echo "0" ; fi) LOWLATENCY_KERNEL:=$(shell if [ $(KERNEL_TYPE) = "lowlatency" ]; then echo "1" ; else echo "0" ; fi)
include $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/Makefile.inc
#ifdef LOWLATENCY # this ifdef is to be removed after the debugging #ifdef LOWLATENCY # this ifdef is to be removed after the debugging
ifeq ($(LOWLATENCY_KERNEL),1) ifeq ($(LOWLATENCY_KERNEL),1)
CFLAGS+=-DLOWLATENCY CFLAGS+=-DLOWLATENCY
...@@ -115,7 +117,6 @@ RTAI_OBJ+=$(LOG_DIR)/vcd_signal_dumper.o ...@@ -115,7 +117,6 @@ RTAI_OBJ+=$(LOG_DIR)/vcd_signal_dumper.o
RTAI_OBJ+=$(LOG_DIR)/log.o RTAI_OBJ+=$(LOG_DIR)/log.o
endif endif
include $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/Makefile.inc
OBJ += $(LOG_OBJS) OBJ += $(LOG_OBJS)
...@@ -376,8 +377,7 @@ cleanasn1: ...@@ -376,8 +377,7 @@ cleanasn1:
$(shell cd $(OPENAIR2_DIR)/RRC/LITE/MESSAGES ; rm -f $(ASN_MODULE_SOURCES) $(ASN_MODULE_HEADERS) *.o *.d ) $(shell cd $(OPENAIR2_DIR)/RRC/LITE/MESSAGES ; rm -f $(ASN_MODULE_SOURCES) $(ASN_MODULE_HEADERS) *.o *.d )
rm -f $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/Makefile.am.sample rm -f $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/Makefile.am.sample
rm -f $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/Makefile.inc.generated rm -f $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/Makefile.inc.generated
rm -f $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1c/ASN1_files/.lock-rel8 rm -f $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1c/ASN1_files/.lock-rel*
rm -f $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1c/ASN1_files/.lock-rel10
cleancell: cleancell:
rm -f $(OPENAIR2_DIR)/RRC/CELLULAR/*.o rm -f $(OPENAIR2_DIR)/RRC/CELLULAR/*.o
......
...@@ -416,8 +416,7 @@ cleanasn1: ...@@ -416,8 +416,7 @@ cleanasn1:
$(shell cd $(OPENAIR2_DIR)/RRC/LITE/MESSAGES ; rm -f $(ASN_MODULE_SOURCES) $(ASN_MODULE_HEADERS) *.o *.d) $(shell cd $(OPENAIR2_DIR)/RRC/LITE/MESSAGES ; rm -f $(ASN_MODULE_SOURCES) $(ASN_MODULE_HEADERS) *.o *.d)
@$(RM_F_V) $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/Makefile.am.sample @$(RM_F_V) $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/Makefile.am.sample
@$(RM_F_V) $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/Makefile.inc.generated @$(RM_F_V) $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/Makefile.inc.generated
@$(RM_F_V) $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1c/ASN1_files/.lock-rel10 @$(RM_F_V) $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1c/ASN1_files/.lock-rel*
@$(RM_F_V) $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1c/ASN1_files/.lock-rel8
cleancell: cleancell:
@$(RM_F_V) $(OPENAIR2_DIR)/RRC/CELLULAR/*.o @$(RM_F_V) $(OPENAIR2_DIR)/RRC/CELLULAR/*.o
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment