Makefile 2.09 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
all: record replay extract_config textlog enb ue vcd macpdu2wireshark \
Cedric Roux's avatar
Cedric Roux committed
9
     extract_input_subframe extract_output_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 25 26 27
extract_output_subframe: extract_output_subframe.o database.o event.o utils.o \
    config.o
	$(CC) $(CFLAGS) -o $@ $^ $(LIBS)

Cedric Roux's avatar
Cedric Roux committed
28
textlog: utils.o textlog.o database.o event.o handler.o config.o \
Cedric Roux's avatar
Cedric Roux committed
29 30
         event_selector.o view/view.a gui/gui.a logger/logger.a \
         filter/filter.a
Cedric Roux's avatar
Cedric Roux committed
31 32 33
	$(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
34 35
         event_selector.o view/view.a gui/gui.a logger/logger.a \
         filter/filter.a
Cedric Roux's avatar
Cedric Roux committed
36 37
	$(CC) $(CFLAGS) -o enb $^ $(LIBS)

38 39 40 41 42
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
43
vcd: utils.o vcd.o database.o event.o handler.o config.o \
Cedric Roux's avatar
Cedric Roux committed
44 45
         event_selector.o view/view.a gui/gui.a logger/logger.a \
         filter/filter.a
Cedric Roux's avatar
Cedric Roux committed
46 47
	$(CC) $(CFLAGS) -o vcd $^ $(LIBS)

48 49 50 51
macpdu2wireshark: macpdu2wireshark.o database.o utils.o handler.o event.o \
                  config.o
	$(CC) $(CFLAGS) -o $@ $^ $(LIBS)

Cedric Roux's avatar
Cedric Roux committed
52
.PHONY: all gui/gui.a view/view.a logger/logger.a filter/filter.a
Cedric Roux's avatar
Cedric Roux committed
53 54 55 56 57 58 59 60 61 62

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
63 64 65
filter/filter.a:
	cd filter && make

Cedric Roux's avatar
Cedric Roux committed
66 67
%.o: %.c
	$(CC) $(CFLAGS) -c -o $@ $<
Cedric Roux's avatar
Cedric Roux committed
68 69

clean:
Cedric Roux's avatar
Cedric Roux committed
70
	rm -f *.o core tracer_remote textlog enb ue vcd record replay
71
	rm -f extract_config macpdu2wireshark extract_input_subframe
Cedric Roux's avatar
Cedric Roux committed
72
	rm -f extract_output_subframe
Cedric Roux's avatar
Cedric Roux committed
73 74 75
	cd gui && make clean
	cd view && make clean
	cd logger && make clean
Cedric Roux's avatar
Cedric Roux committed
76
	cd filter && make clean
77
	cd hacks && make clean