Commit 568128e1 authored by winckel's avatar winckel

Fixed some build issue with USE_MME enabled.

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4657 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 214805b4
......@@ -4,7 +4,6 @@ include $(UE_NAS_DIR)/EURECOM-NAS/Makefile.inc
libnas_INCLUDES = \
-I$(OPENAIR2_DIR) \
-I$(OPENAIR2_DIR)/NAS \
-I$(SRCDIR) \
-I$(INCDIR) \
-I$(UTILDIR) \
......@@ -270,13 +269,14 @@ NAS_UE_COMPILED_OBJS = $(addprefix $(OUTDIR)/,$(libnas_OBJS))
# pull in dependency info for *existing* .o files
-include $(NAS_UE_COMPILED_OBJS:.o=.d)
CFLAGS += \
CFLAGS = \
-Wall \
-DNAS_UE \
-DUE_BUILD \
-Wuninitialized \
-Werror=implicit-function-declaration \
$(libnas_INCLUDES)
$(libnas_INCLUDES) \
$(UENAS_CFLAGS)
.SECONDEXPANSION:
$(NAS_UE_COMPILED_OBJS): %.o : $$(subst $(OUTDIR), $(UE_NAS_DIR), $$*.c)
......@@ -295,9 +295,12 @@ $(OUTDIR)/libuenas.a: $(NAS_UE_COMPILED_OBJS)
@$(AR) rcs $@ $(addprefix $(OUTDIR)/,$(libnas_OBJS))
clean:
@$(RM_F_V) --recursive $(OUTDIR)/*
@$(RM_F_V) -r $(OUTDIR)/*.o
@$(RM_F_V) -r $(OUTDIR)/*.d
@$(RM_F_V) $(OUTDIR)/libuenas.a
cleanall: clean
cleanall:
@$(RM_F_V) -r $(OUTDIR)
showcflags:
@echo uenas cflags: $(CFLAGS)
......@@ -38,4 +38,6 @@ $(OUTDIR)/libsctp.a: $(addprefix $(OUTDIR)/,$(libsctp_OBJECTS))
clean:
@$(RM_F_V) $(OUTDIR)/*.o
@$(RM_F_V) $(OUTDIR)/*.d
@$(RM_F_V) $(OUTDIR)/libsctp.a
\ No newline at end of file
@$(RM_F_V) $(OUTDIR)/libsctp.a
cleanall: clean
# This file gathers compilation directive shared between lte-softmodem and oaisim
COMMON_UTILS_DIR = $(OPENAIR_HOME)/common/utils
UE_NAS_DIR = $(OPENAIR_HOME)/openair-cn/NAS
S1AP_DIR = $(OPENAIR_HOME)/openair-cn/S1AP
SCTP_DIR = $(OPENAIR_HOME)/openair-cn/SCTP
CFLAGS += -D'FIRMWARE_VERSION="$(SVN_REV) - $(DATE_REV)"'
UE_NAS_OBJ_DIR = $(subst $(OPENAIR_HOME),$(OBJS_DIR),$(UE_NAS_DIR))
S1AP_OBJ_DIR = $(subst $(OPENAIR_HOME),$(OBJS_DIR),$(S1AP_DIR))
SCTP_OBJ_DIR = $(subst $(OPENAIR_HOME),$(OBJS_DIR),$(SCTP_DIR))
export COMMON_UTILS_DIR
export UE_NAS_DIR
export S1AP_DIR
export SCTP_DIR
COMMON_CFLAGS = -D'FIRMWARE_VERSION="$(SVN_REV) - $(DATE_REV)"'
ITTI_MESSAGES_H = messages_xml.h
ITTI_MESSAGES_XML = messages.xml
......@@ -25,20 +38,33 @@ $(ITTI_MESSAGES_H): $(ITTI_MESSAGES_XML)
@sed -e 's/[ ]*//' -e 's/"/\\"/g' -e 's/^/"/' -e 's/$$/\\n"/' $< > $@
ifdef USE_MME
COMMON_CFLAGS += -DENABLE_USE_MME
LIBS += $(UE_NAS_OBJ_DIR)/libuenas.a
LIBS += $(S1AP_OBJ_DIR)/libs1ap.a $(SCTP_OBJ_DIR)/libsctp.a -lsctp -lcrypt
SHARED_DEPENDENCIES = $(UE_NAS_OBJ_DIR)/libuenas.a $(S1AP_OBJ_DIR)/libs1ap.a $(SCTP_OBJ_DIR)/libsctp.a
ENABLE_ITTI = 1
COMMON_CFLAGS += -DENABLE_ITTI
COMMON_CFLAGS += -DUSER_MODE
COMMON_CFLAGS += -DLOG_NO_THREAD
COMMON_CFLAGS += -I$(OPENAIR2_DIR)/NAS
COMMON_CFLAGS += $(L2_incl)
COMMON_CFLAGS += $(UTILS_incl)
CFLAGS += -DENABLE_ITTI -DENABLE_USE_MME
export CFLAGS
UENAS_CFLAGS = $(COMMON_CFLAGS)
export UENAS_CFLAGS
$(UE_NAS_OBJ_DIR)/libuenas.a: force_look
@$(MAKE) -C $(UE_NAS_DIR) -f Makefile.UE $(UE_NAS_OBJ_DIR)/libuenas.a OUTDIR=$(UE_NAS_OBJ_DIR)
CFLAGS += -DENB_MODE -I$(S1AP_DIR) -I$(SCTP_DIR)
S1AP_CFLAGS = $(CFLAGS) -I$(TOP_DIR) $(L2_incl) $(UTIL_incl) $(UTILS_incl)
COMMON_MME_CFLAGS = -I$(SCTP_DIR)
COMMON_MME_CFLAGS += -I$(S1AP_DIR)
S1AP_CFLAGS = $(COMMON_CFLAGS) $(COMMON_MME_CFLAGS)
S1AP_CFLAGS += -DENB_MODE
S1AP_CFLAGS += -I$(TOP_DIR)
S1AP_CFLAGS += $(UTIL_incl)
export S1AP_CFLAGS
$(S1AP_OBJ_DIR)/libs1ap.a: force_look
......@@ -46,15 +72,13 @@ $(S1AP_OBJ_DIR)/libs1ap.a: force_look
$(SCTP_OBJ_DIR)/libsctp.a: force_look
@$(MAKE) -C $(SCTP_DIR) -f Makefile.eNB $(SCTP_OBJ_DIR)/libsctp.a OUTDIR=$(SCTP_OBJ_DIR)
CFLAGS += $(NAS_UE_incl)
OBJ = $(NAS_UE_OBJS)
endif
ifdef ENABLE_ITTI
SHARED_DEPENDENCIES += $(ITTI_MESSAGES_H)
CFLAGS += $(TARGETS_COMMON_incl)
CFLAGS = $(COMMON_CFLAGS) $(COMMON_MME_CFLAGS) $(TARGETS_COMMON_incl)
OBJ += $(TARGETS_COMMON_OBJS)
endif
......@@ -73,5 +97,11 @@ force_look:
common-clean:
@$(RM_F_V) $(ITTI_MESSAGES_H) $(ITTI_MESSAGES_XML) $(ITTI_MESSAGES_XML:.xml=.d)
@$(MAKE) -C $(LFDS_DIR) -f makefile.linux clean OUTDIR=$(LFDS_OBJ_DIR)
# @if [ -d $(S1AP_DIR) ]; then $(MAKE) -C $(S1AP_DIR) -f Makefile.eNB clean OUTDIR=$(S1AP_OBJ_DIR); fi
# @if [ -d $(SCTP_DIR) ]; then $(MAKE) -C $(SCTP_DIR) -f Makefile.eNB clean OUTDIR=$(SCTP_OBJ_DIR); fi
@if [ -d $(UE_NAS_OBJ_DIR) ]; then $(MAKE) -C $(UE_NAS_DIR) -f Makefile.UE clean OUTDIR=$(UE_NAS_OBJ_DIR); fi
@if [ -d $(S1AP_OBJ_DIR) ]; then $(MAKE) -C $(S1AP_DIR) -f Makefile.eNB clean OUTDIR=$(S1AP_OBJ_DIR); fi
@if [ -d $(SCTP_OBJ_DIR) ]; then $(MAKE) -C $(SCTP_DIR) -f Makefile.eNB clean OUTDIR=$(SCTP_OBJ_DIR); fi
common-cleanall:
@if [ -d $(UE_NAS_OBJ_DIR) ]; then $(MAKE) -C $(UE_NAS_DIR) -f Makefile.UE cleanall OUTDIR=$(UE_NAS_OBJ_DIR); fi
@if [ -d $(S1AP_OBJ_DIR) ]; then $(MAKE) -C $(S1AP_DIR) -f Makefile.eNB cleanall OUTDIR=$(S1AP_OBJ_DIR); fi
@if [ -d $(SCTP_OBJ_DIR) ]; then $(MAKE) -C $(SCTP_DIR) -f Makefile.eNB cleanall OUTDIR=$(SCTP_OBJ_DIR); fi
CC = gcc
MPICC = gcc #mpicc
RM_F_V = rm -f -v
PWD = $(shell pwd)
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
......@@ -59,17 +63,3 @@ COMMON_CFLAGS = \
-g \
-ggdb \
-O2
COMMON_UTILS_DIR = $(OPENAIR_HOME)/common/utils
UE_NAS_DIR = $(OPENAIR_HOME)/openair-cn/NAS
S1AP_DIR = $(OPENAIR_HOME)/openair-cn/S1AP
SCTP_DIR = $(OPENAIR_HOME)/openair-cn/SCTP
UE_NAS_OBJ_DIR = $(subst $(OPENAIR_HOME),$(OBJS_DIR),$(UE_NAS_DIR))
S1AP_OBJ_DIR = $(subst $(OPENAIR_HOME),$(OBJS_DIR),$(S1AP_DIR))
SCTP_OBJ_DIR = $(subst $(OPENAIR_HOME),$(OBJS_DIR),$(SCTP_DIR))
export COMMON_UTILS_DIR
export UE_NAS_DIR
export S1AP_DIR
export SCTP_DIR
......@@ -328,7 +328,7 @@ cleanalmostall: clean
rm -rf condtest synctest lte-softmodem
rm -rf synctest_eNB synctest_UE
cleanall: clean cleanasn1
cleanall: common-cleanall clean cleanasn1
rm -rf condtest synctest lte-softmodem lte-softmodem-usrp
rm -rf synctest_eNB synctest_UE
......
......@@ -366,10 +366,7 @@ nas_sim_rg_cellular:
rrm_std_cellular:
( cd $(OPENAIR2_DIR)/NAS/SIMU_CELLULAR && make cell_rrm CELL_RRM=1 CELLULAR=1 NO_RRM=1)
cleanall: clean cleanasn1
@if [ -d $(UE_NAS_DIR) ]; then $(MAKE) -C $(UE_NAS_DIR) -f Makefile.UE cleanall OUTDIR=$(UE_NAS_OBJ_DIR); fi
@if [ -d $(S1AP_DIR) ]; then $(MAKE) -C $(S1AP_DIR) -f Makefile.eNB cleanall OUTDIR=$(S1AP_OBJ_DIR); fi
@if [ -d $(SCTP_DIR) ]; then $(MAKE) -C $(SCTP_DIR) -f Makefile.eNB cleanall OUTDIR=$(SCTP_OBJ_DIR); fi
cleanall: common-cleanall clean cleanasn1
cleanalmostall: clean
rm -f $(ASN1_MSG_OBJS1)
......
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