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 ...@@ -4,7 +4,6 @@ include $(UE_NAS_DIR)/EURECOM-NAS/Makefile.inc
libnas_INCLUDES = \ libnas_INCLUDES = \
-I$(OPENAIR2_DIR) \ -I$(OPENAIR2_DIR) \
-I$(OPENAIR2_DIR)/NAS \
-I$(SRCDIR) \ -I$(SRCDIR) \
-I$(INCDIR) \ -I$(INCDIR) \
-I$(UTILDIR) \ -I$(UTILDIR) \
...@@ -270,13 +269,14 @@ NAS_UE_COMPILED_OBJS = $(addprefix $(OUTDIR)/,$(libnas_OBJS)) ...@@ -270,13 +269,14 @@ NAS_UE_COMPILED_OBJS = $(addprefix $(OUTDIR)/,$(libnas_OBJS))
# pull in dependency info for *existing* .o files # pull in dependency info for *existing* .o files
-include $(NAS_UE_COMPILED_OBJS:.o=.d) -include $(NAS_UE_COMPILED_OBJS:.o=.d)
CFLAGS += \ CFLAGS = \
-Wall \ -Wall \
-DNAS_UE \ -DNAS_UE \
-DUE_BUILD \ -DUE_BUILD \
-Wuninitialized \ -Wuninitialized \
-Werror=implicit-function-declaration \ -Werror=implicit-function-declaration \
$(libnas_INCLUDES) $(libnas_INCLUDES) \
$(UENAS_CFLAGS)
.SECONDEXPANSION: .SECONDEXPANSION:
$(NAS_UE_COMPILED_OBJS): %.o : $$(subst $(OUTDIR), $(UE_NAS_DIR), $$*.c) $(NAS_UE_COMPILED_OBJS): %.o : $$(subst $(OUTDIR), $(UE_NAS_DIR), $$*.c)
...@@ -295,9 +295,12 @@ $(OUTDIR)/libuenas.a: $(NAS_UE_COMPILED_OBJS) ...@@ -295,9 +295,12 @@ $(OUTDIR)/libuenas.a: $(NAS_UE_COMPILED_OBJS)
@$(AR) rcs $@ $(addprefix $(OUTDIR)/,$(libnas_OBJS)) @$(AR) rcs $@ $(addprefix $(OUTDIR)/,$(libnas_OBJS))
clean: 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: showcflags:
@echo uenas cflags: $(CFLAGS) @echo uenas cflags: $(CFLAGS)
...@@ -39,3 +39,5 @@ clean: ...@@ -39,3 +39,5 @@ clean:
@$(RM_F_V) $(OUTDIR)/*.o @$(RM_F_V) $(OUTDIR)/*.o
@$(RM_F_V) $(OUTDIR)/*.d @$(RM_F_V) $(OUTDIR)/*.d
@$(RM_F_V) $(OUTDIR)/libsctp.a @$(RM_F_V) $(OUTDIR)/libsctp.a
cleanall: clean
# 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
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_H = messages_xml.h
ITTI_MESSAGES_XML = messages.xml ITTI_MESSAGES_XML = messages.xml
...@@ -25,20 +38,33 @@ $(ITTI_MESSAGES_H): $(ITTI_MESSAGES_XML) ...@@ -25,20 +38,33 @@ $(ITTI_MESSAGES_H): $(ITTI_MESSAGES_XML)
@sed -e 's/[ ]*//' -e 's/"/\\"/g' -e 's/^/"/' -e 's/$$/\\n"/' $< > $@ @sed -e 's/[ ]*//' -e 's/"/\\"/g' -e 's/^/"/' -e 's/$$/\\n"/' $< > $@
ifdef USE_MME ifdef USE_MME
COMMON_CFLAGS += -DENABLE_USE_MME
LIBS += $(UE_NAS_OBJ_DIR)/libuenas.a LIBS += $(UE_NAS_OBJ_DIR)/libuenas.a
LIBS += $(S1AP_OBJ_DIR)/libs1ap.a $(SCTP_OBJ_DIR)/libsctp.a -lsctp -lcrypt 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 SHARED_DEPENDENCIES = $(UE_NAS_OBJ_DIR)/libuenas.a $(S1AP_OBJ_DIR)/libs1ap.a $(SCTP_OBJ_DIR)/libsctp.a
ENABLE_ITTI = 1 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 UENAS_CFLAGS = $(COMMON_CFLAGS)
export CFLAGS export UENAS_CFLAGS
$(UE_NAS_OBJ_DIR)/libuenas.a: force_look $(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) @$(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) COMMON_MME_CFLAGS = -I$(SCTP_DIR)
S1AP_CFLAGS = $(CFLAGS) -I$(TOP_DIR) $(L2_incl) $(UTIL_incl) $(UTILS_incl) 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 export S1AP_CFLAGS
$(S1AP_OBJ_DIR)/libs1ap.a: force_look $(S1AP_OBJ_DIR)/libs1ap.a: force_look
...@@ -46,15 +72,13 @@ $(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 $(SCTP_OBJ_DIR)/libsctp.a: force_look
@$(MAKE) -C $(SCTP_DIR) -f Makefile.eNB $(SCTP_OBJ_DIR)/libsctp.a OUTDIR=$(SCTP_OBJ_DIR) @$(MAKE) -C $(SCTP_DIR) -f Makefile.eNB $(SCTP_OBJ_DIR)/libsctp.a OUTDIR=$(SCTP_OBJ_DIR)
CFLAGS += $(NAS_UE_incl)
OBJ = $(NAS_UE_OBJS) OBJ = $(NAS_UE_OBJS)
endif endif
ifdef ENABLE_ITTI ifdef ENABLE_ITTI
SHARED_DEPENDENCIES += $(ITTI_MESSAGES_H) SHARED_DEPENDENCIES += $(ITTI_MESSAGES_H)
CFLAGS += $(TARGETS_COMMON_incl) CFLAGS = $(COMMON_CFLAGS) $(COMMON_MME_CFLAGS) $(TARGETS_COMMON_incl)
OBJ += $(TARGETS_COMMON_OBJS) OBJ += $(TARGETS_COMMON_OBJS)
endif endif
...@@ -73,5 +97,11 @@ force_look: ...@@ -73,5 +97,11 @@ force_look:
common-clean: common-clean:
@$(RM_F_V) $(ITTI_MESSAGES_H) $(ITTI_MESSAGES_XML) $(ITTI_MESSAGES_XML:.xml=.d) @$(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) @$(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 $(UE_NAS_OBJ_DIR) ]; then $(MAKE) -C $(UE_NAS_DIR) -f Makefile.UE clean OUTDIR=$(UE_NAS_OBJ_DIR); fi
# @if [ -d $(SCTP_DIR) ]; then $(MAKE) -C $(SCTP_DIR) -f Makefile.eNB clean OUTDIR=$(SCTP_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
...@@ -2,6 +2,10 @@ CC = gcc ...@@ -2,6 +2,10 @@ CC = gcc
MPICC = gcc #mpicc MPICC = gcc #mpicc
RM_F_V = rm -f -v RM_F_V = rm -f -v
PWD = $(shell pwd) PWD = $(shell pwd)
export CC
export MPICC
export RM_F_V
export PWD
OBJS_DIR := $(PWD)/objs OBJS_DIR := $(PWD)/objs
...@@ -59,17 +63,3 @@ COMMON_CFLAGS = \ ...@@ -59,17 +63,3 @@ COMMON_CFLAGS = \
-g \ -g \
-ggdb \ -ggdb \
-O2 -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 ...@@ -328,7 +328,7 @@ cleanalmostall: clean
rm -rf condtest synctest lte-softmodem rm -rf condtest synctest lte-softmodem
rm -rf synctest_eNB synctest_UE 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 condtest synctest lte-softmodem lte-softmodem-usrp
rm -rf synctest_eNB synctest_UE rm -rf synctest_eNB synctest_UE
......
...@@ -366,10 +366,7 @@ nas_sim_rg_cellular: ...@@ -366,10 +366,7 @@ nas_sim_rg_cellular:
rrm_std_cellular: rrm_std_cellular:
( cd $(OPENAIR2_DIR)/NAS/SIMU_CELLULAR && make cell_rrm CELL_RRM=1 CELLULAR=1 NO_RRM=1) ( cd $(OPENAIR2_DIR)/NAS/SIMU_CELLULAR && make cell_rrm CELL_RRM=1 CELLULAR=1 NO_RRM=1)
cleanall: clean cleanasn1 cleanall: common-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
cleanalmostall: clean cleanalmostall: clean
rm -f $(ASN1_MSG_OBJS1) 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