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

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

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

8
9
all: record replay extract_config textlog enb ue vcd macpdu2wireshark \
     extract_input_subframe
Cedric Roux's avatar
Cedric Roux committed
10
11
12

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

Cedric Roux's avatar
Cedric Roux committed
14
15
16
replay: utils.o replay.o
	$(CC) $(CFLAGS) -o replay $^ $(LIBS)

17
18
19
extract_config: extract_config.o
	$(CC) $(CFLAGS) -o extract_config $^ $(LIBS)

20
21
22
23
extract_input_subframe: extract_input_subframe.o database.o event.o utils.o \
    config.o
	$(CC) $(CFLAGS) -o $@ $^ $(LIBS)

Cedric Roux's avatar
Cedric Roux committed
24
textlog: utils.o textlog.o database.o event.o handler.o config.o \
Cedric Roux's avatar
Cedric Roux committed
25
26
         event_selector.o view/view.a gui/gui.a logger/logger.a \
         filter/filter.a
Cedric Roux's avatar
Cedric Roux committed
27
28
29
	$(CC) $(CFLAGS) -o textlog $^ $(LIBS)

enb: utils.o enb.o database.o event.o handler.o config.o \
Cedric Roux's avatar
Cedric Roux committed
30
31
         event_selector.o view/view.a gui/gui.a logger/logger.a \
         filter/filter.a
Cedric Roux's avatar
Cedric Roux committed
32
33
	$(CC) $(CFLAGS) -o enb $^ $(LIBS)

34
35
36
37
38
ue: utils.o ue.o database.o event.o handler.o config.o \
         event_selector.o view/view.a gui/gui.a logger/logger.a \
         filter/filter.a
	$(CC) $(CFLAGS) -o ue $^ $(LIBS)

Cedric Roux's avatar
Cedric Roux committed
39
vcd: utils.o vcd.o database.o event.o handler.o config.o \
Cedric Roux's avatar
Cedric Roux committed
40
41
         event_selector.o view/view.a gui/gui.a logger/logger.a \
         filter/filter.a
Cedric Roux's avatar
Cedric Roux committed
42
43
	$(CC) $(CFLAGS) -o vcd $^ $(LIBS)

44
45
46
47
macpdu2wireshark: macpdu2wireshark.o database.o utils.o handler.o event.o \
                  config.o
	$(CC) $(CFLAGS) -o $@ $^ $(LIBS)

Cedric Roux's avatar
Cedric Roux committed
48
.PHONY: all gui/gui.a view/view.a logger/logger.a filter/filter.a
Cedric Roux's avatar
Cedric Roux committed
49
50
51
52
53
54
55
56
57
58

gui/gui.a:
	cd gui && make

view/view.a:
	cd view && make

logger/logger.a:
	cd logger && make

Cedric Roux's avatar
Cedric Roux committed
59
60
61
filter/filter.a:
	cd filter && make

Cedric Roux's avatar
Cedric Roux committed
62
63
%.o: %.c
	$(CC) $(CFLAGS) -c -o $@ $<
Cedric Roux's avatar
Cedric Roux committed
64
65

clean:
Cedric Roux's avatar
Cedric Roux committed
66
	rm -f *.o core tracer_remote textlog enb ue vcd record replay
67
	rm -f extract_config macpdu2wireshark extract_input_subframe
Cedric Roux's avatar
Cedric Roux committed
68
69
70
	cd gui && make clean
	cd view && make clean
	cd logger && make clean
Cedric Roux's avatar
Cedric Roux committed
71
	cd filter && make clean
72
	cd hacks && make clean