When using the make system to generate T files, if you change
T_messages.txt you may have problems compiling the gnb with ninja.
If you want to see the problem:
First run: cd cmake_targets; ./build_oai --ninja --gNB
Then: cd common/utils/T
edit T_messages.txt, add a trace, for example:
---
ID = ENB_PHY_UL_TOCK
DESC = eNodeB uplink tick - one tick per ms at start of uplink processing
GROUP = ALL:PHY:GRAPHIC:ENB
FORMAT = int,eNB_ID : int,frame : int,subframe
---
then run: make
then: cd cmake_targets/ran_build/build; ninja nr-softmodem
You should have an error looking like this:
---
[3/81] Checking validity of VCD files
FAILED: common/utils/T/CMakeFiles/check_vcd /tmp/develop/cmake_targets/ran_build/build/common/utils/T/CMakeFiles/check_vcd
cd /tmp/develop/cmake_targets/ran_build/build/common/utils/T && /tmp/develop/cmake_targets/ran_build/build/common/utils/T/_check_vcd /tmp/develop/common/utils/T/T_messages.txt /tmp/develop/common/utils/T/../LOG/vcd_signal_dumper.h
error: VCD_FIRST_VARIABLE is not correct in T_defs.h
You probably added a VCD trace (variable or function) but you did not
update T_messages.txt and/or T_defs.h in common/utils/T/
[...]
---
Let's first isolate the generated T .h files when using make because
we have two versions of T_IDs.h and T_messages.txt.h when mixing
make/cmake.
A next commit will regenerate T_IDs.h and T_messages.txt.h when
T_messages.txt chages for the cmake system, because this commit
does not solve the problem.
100 lines
2.9 KiB
Makefile
100 lines
2.9 KiB
Makefile
CC=gcc
|
|
CFLAGS=-Wall -g -pthread -DT_TRACER -I. -I../incgen
|
|
|
|
#CFLAGS += -O3 -ffast-math -fomit-frame-pointer
|
|
|
|
LIBS=-lm
|
|
XLIBS=-lX11 -lpng -lXft
|
|
|
|
all: record replay extract_config textlog enb ue vcd macpdu2wireshark \
|
|
extract_input_subframe extract_output_subframe to_vcd extract multi \
|
|
gnb
|
|
|
|
record: utils.o record.o database.o configuration.o
|
|
$(CC) $(CFLAGS) -o record $^ $(LIBS)
|
|
|
|
replay: utils.o replay.o
|
|
$(CC) $(CFLAGS) -o replay $^ $(LIBS)
|
|
|
|
extract_config: extract_config.o
|
|
$(CC) $(CFLAGS) -o extract_config $^ $(LIBS)
|
|
|
|
extract_input_subframe: extract_input_subframe.o database.o event.o utils.o \
|
|
configuration.o
|
|
$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
|
|
|
|
extract_output_subframe: extract_output_subframe.o database.o event.o utils.o \
|
|
configuration.o
|
|
$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
|
|
|
|
extract: extract.o database.o event.o utils.o configuration.o
|
|
$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
|
|
|
|
textlog: utils.o textlog.o database.o event.o handler.o configuration.o \
|
|
event_selector.o view/view.a gui/gui.a logger/logger.a \
|
|
filter/filter.a
|
|
$(CC) $(CFLAGS) -o textlog $^ $(LIBS) $(XLIBS)
|
|
|
|
enb: utils.o enb.o database.o event.o handler.o configuration.o \
|
|
event_selector.o view/view.a gui/gui.a logger/logger.a \
|
|
filter/filter.a
|
|
$(CC) $(CFLAGS) -o enb $^ $(LIBS) $(XLIBS)
|
|
|
|
ue: utils.o ue.o database.o event.o handler.o configuration.o \
|
|
event_selector.o view/view.a gui/gui.a logger/logger.a \
|
|
filter/filter.a
|
|
$(CC) $(CFLAGS) -o ue $^ $(LIBS) $(XLIBS)
|
|
|
|
vcd: utils.o vcd.o database.o event.o handler.o configuration.o \
|
|
event_selector.o view/view.a gui/gui.a logger/logger.a \
|
|
filter/filter.a
|
|
$(CC) $(CFLAGS) -o vcd $^ $(LIBS) $(XLIBS)
|
|
|
|
to_vcd: to_vcd.o database.o event.o handler.o utils.o configuration.o \
|
|
logger/logger.a filter/filter.a
|
|
$(CC) $(CFLAGS) -o to_vcd $^ $(LIBS)
|
|
|
|
macpdu2wireshark: macpdu2wireshark.o database.o utils.o handler.o event.o \
|
|
configuration.o
|
|
$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
|
|
|
|
multi: multi.o utils.o database.o configuration.o
|
|
$(CC) $(CFLAGS) -o multi $^ $(LIBS)
|
|
|
|
gnb: utils.o gnb.o database.o event.o handler.o configuration.o \
|
|
view/view.a gui/gui.a logger/logger.a \
|
|
filter/filter.a
|
|
$(CC) $(CFLAGS) -o gnb $^ $(LIBS) $(XLIBS)
|
|
|
|
multi.o: ../incgen/T_IDs.h
|
|
|
|
../incgen/T_IDs.h: ../T_messages.txt
|
|
cd .. && $(MAKE)
|
|
|
|
.PHONY: all gui/gui.a view/view.a logger/logger.a filter/filter.a
|
|
|
|
gui/gui.a:
|
|
cd gui && $(MAKE)
|
|
|
|
view/view.a:
|
|
cd view && $(MAKE)
|
|
|
|
logger/logger.a:
|
|
cd logger && $(MAKE)
|
|
|
|
filter/filter.a:
|
|
cd filter && $(MAKE)
|
|
|
|
%.o: %.c
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
clean:
|
|
rm -f *.o core tracer_remote textlog enb ue vcd record replay
|
|
rm -f extract_config macpdu2wireshark extract_input_subframe
|
|
rm -f extract_output_subframe to_vcd extract multi gnb
|
|
cd gui && $(MAKE) clean
|
|
cd view && $(MAKE) clean
|
|
cd logger && $(MAKE) clean
|
|
cd filter && $(MAKE) clean
|
|
cd hacks && $(MAKE) clean
|