Skip to content
Snippets Groups Projects
Makefile 2.48 KiB
Newer Older
Cedric Roux's avatar
Cedric Roux committed
CC=gcc
CFLAGS=-Wall -g -pthread -DT_TRACER -I.
Cedric Roux's avatar
Cedric Roux committed
#CFLAGS += -O3 -ffast-math -fomit-frame-pointer
Cedric Roux's avatar
Cedric Roux committed
LIBS=-lm
XLIBS=-lX11 -lpng -lXft
all: record replay extract_config textlog enb ue vcd macpdu2wireshark \
Cedric Roux's avatar
Cedric Roux committed
     extract_input_subframe extract_output_subframe to_vcd extract multi
Cedric Roux's avatar
Cedric Roux committed

record: utils.o record.o database.o config.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 \
    config.o
	$(CC) $(CFLAGS) -o $@ $^ $(LIBS)

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
extract: extract.o database.o event.o utils.o config.o
	$(CC) $(CFLAGS) -o $@ $^ $(LIBS)

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

enb: utils.o enb.o database.o event.o handler.o config.o \
Cedric Roux's avatar
Cedric Roux committed
         event_selector.o view/view.a gui/gui.a logger/logger.a \
         filter/filter.a
Cedric Roux's avatar
Cedric Roux committed
	$(CC) $(CFLAGS) -o enb $^ $(LIBS) $(XLIBS)
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
Cedric Roux's avatar
Cedric Roux committed
	$(CC) $(CFLAGS) -o ue $^ $(LIBS) $(XLIBS)
Cedric Roux's avatar
Cedric Roux committed
vcd: utils.o vcd.o database.o event.o handler.o config.o \
Cedric Roux's avatar
Cedric Roux committed
         event_selector.o view/view.a gui/gui.a logger/logger.a \
         filter/filter.a
Cedric Roux's avatar
Cedric Roux committed
	$(CC) $(CFLAGS) -o vcd $^ $(LIBS) $(XLIBS)
to_vcd: to_vcd.o database.o event.o handler.o utils.o config.o \
         logger/logger.a filter/filter.a
Cedric Roux's avatar
Cedric Roux committed
	$(CC) $(CFLAGS) -o to_vcd $^ $(LIBS)
macpdu2wireshark: macpdu2wireshark.o database.o utils.o handler.o event.o \
                  config.o
	$(CC) $(CFLAGS) -o $@ $^ $(LIBS)

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

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

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

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

clean:
Cedric Roux's avatar
Cedric Roux committed
	rm -f *.o core tracer_remote textlog enb ue vcd record replay
	rm -f extract_config macpdu2wireshark extract_input_subframe
Cedric Roux's avatar
Cedric Roux committed
	rm -f extract_output_subframe to_vcd extract multi
Cedric Roux's avatar
Cedric Roux committed
	cd gui && make clean
	cd view && make clean
	cd logger && make clean
Cedric Roux's avatar
Cedric Roux committed
	cd filter && make clean