Makefile 2.83 KB
Newer Older
Cedric Roux's avatar
Cedric Roux committed
1
CC=gcc
2
CFLAGS=-Wall -g -pthread -DT_TRACER -I. -I../incgen
3

Cedric Roux's avatar
Cedric Roux committed
4
#CFLAGS += -O3 -ffast-math -fomit-frame-pointer
5

Cedric Roux's avatar
Cedric Roux committed
6 7
LIBS=-lm
XLIBS=-lX11 -lpng -lXft
Cedric Roux's avatar
Cedric Roux committed
8

9
all: record replay extract_config textlog enb ue vcd macpdu2wireshark \
Cedric Roux's avatar
Cedric Roux committed
10 11
     extract_input_subframe extract_output_subframe to_vcd extract multi \
     gnb
Cedric Roux's avatar
Cedric Roux committed
12

13
record: utils.o record.o database.o configuration.o
Cedric Roux's avatar
Cedric Roux committed
14
	$(CC) $(CFLAGS) -o record $^ $(LIBS)
Cedric Roux's avatar
Cedric Roux committed
15

16 17 18
replay: utils.o replay.o
	$(CC) $(CFLAGS) -o replay $^ $(LIBS)

19 20 21
extract_config: extract_config.o
	$(CC) $(CFLAGS) -o extract_config $^ $(LIBS)

22
extract_input_subframe: extract_input_subframe.o database.o event.o utils.o \
23
    configuration.o
24 25
	$(CC) $(CFLAGS) -o $@ $^ $(LIBS)

26
extract_output_subframe: extract_output_subframe.o database.o event.o utils.o \
27
    configuration.o
28 29
	$(CC) $(CFLAGS) -o $@ $^ $(LIBS)

30
extract: extract.o database.o event.o utils.o configuration.o
Cedric Roux's avatar
Cedric Roux committed
31 32
	$(CC) $(CFLAGS) -o $@ $^ $(LIBS)

33
textlog: utils.o textlog.o database.o event.o handler.o configuration.o \
34 35
         view/view.a logger/logger.a filter/filter.a
	$(CC) $(CFLAGS) -o textlog $^ $(LIBS)
Cedric Roux's avatar
Cedric Roux committed
36

37
enb: utils.o enb.o database.o event.o handler.o configuration.o \
Cedric Roux's avatar
Cedric Roux committed
38 39
         event_selector.o view/view.a gui/gui.a logger/logger.a \
         filter/filter.a
Cedric Roux's avatar
Cedric Roux committed
40
	$(CC) $(CFLAGS) -o enb $^ $(LIBS) $(XLIBS)
Cedric Roux's avatar
Cedric Roux committed
41

42
ue: utils.o ue.o database.o event.o handler.o configuration.o \
43 44
         event_selector.o view/view.a gui/gui.a logger/logger.a \
         filter/filter.a
Cedric Roux's avatar
Cedric Roux committed
45
	$(CC) $(CFLAGS) -o ue $^ $(LIBS) $(XLIBS)
46

47
vcd: utils.o vcd.o database.o event.o handler.o configuration.o \
Cedric Roux's avatar
Cedric Roux committed
48 49
         event_selector.o view/view.a gui/gui.a logger/logger.a \
         filter/filter.a
Cedric Roux's avatar
Cedric Roux committed
50
	$(CC) $(CFLAGS) -o vcd $^ $(LIBS) $(XLIBS)
Cedric Roux's avatar
Cedric Roux committed
51

52
to_vcd: to_vcd.o database.o event.o handler.o utils.o configuration.o \
53
         logger/logger.a filter/filter.a
Cedric Roux's avatar
Cedric Roux committed
54
	$(CC) $(CFLAGS) -o to_vcd $^ $(LIBS)
55

56
macpdu2wireshark: macpdu2wireshark.o database.o utils.o handler.o event.o \
57
                  configuration.o
58 59
	$(CC) $(CFLAGS) -o $@ $^ $(LIBS)

60
multi: multi.o utils.o database.o configuration.o
Cedric Roux's avatar
Cedric Roux committed
61 62
	$(CC) $(CFLAGS) -o multi $^ $(LIBS)

63
gnb: utils.o gnb.o database.o event.o handler.o configuration.o \
Cedric Roux's avatar
Cedric Roux committed
64 65 66 67
         view/view.a gui/gui.a logger/logger.a \
         filter/filter.a
	$(CC) $(CFLAGS) -o gnb $^ $(LIBS) $(XLIBS)

68
multi.o: ../incgen/T_IDs.h
69

70
../incgen/T_IDs.h: ../T_messages.txt
71 72
	cd .. && $(MAKE)

Cedric Roux's avatar
Cedric Roux committed
73
.PHONY: all gui/gui.a view/view.a logger/logger.a filter/filter.a
Cedric Roux's avatar
Cedric Roux committed
74 75

gui/gui.a:
76
	cd gui && $(MAKE)
Cedric Roux's avatar
Cedric Roux committed
77 78

view/view.a:
79
	cd view && $(MAKE)
Cedric Roux's avatar
Cedric Roux committed
80 81

logger/logger.a:
82
	cd logger && $(MAKE)
Cedric Roux's avatar
Cedric Roux committed
83

Cedric Roux's avatar
Cedric Roux committed
84
filter/filter.a:
85
	cd filter && $(MAKE)
Cedric Roux's avatar
Cedric Roux committed
86

Cedric Roux's avatar
Cedric Roux committed
87 88
%.o: %.c
	$(CC) $(CFLAGS) -c -o $@ $<
Cedric Roux's avatar
Cedric Roux committed
89 90

clean:
Cedric Roux's avatar
Cedric Roux committed
91
	rm -f *.o core tracer_remote textlog enb ue vcd record replay
92
	rm -f extract_config macpdu2wireshark extract_input_subframe
Cedric Roux's avatar
Cedric Roux committed
93
	rm -f extract_output_subframe to_vcd extract multi gnb
94 95 96 97 98
	cd gui && $(MAKE) clean
	cd view && $(MAKE) clean
	cd logger && $(MAKE) clean
	cd filter && $(MAKE) clean
	cd hacks && $(MAKE) clean