Makefile 1.39 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
5

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

8
all: record replay extract_config textlog enb vcd
Cedric Roux's avatar
Cedric Roux committed
9 10 11

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

13 14 15
replay: utils.o replay.o
	$(CC) $(CFLAGS) -o replay $^ $(LIBS)

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

Cedric Roux's avatar
Cedric Roux committed
19
textlog: utils.o textlog.o database.o event.o handler.o config.o \
Cedric Roux's avatar
Cedric Roux committed
20 21
         event_selector.o view/view.a gui/gui.a logger/logger.a \
         filter/filter.a
Cedric Roux's avatar
Cedric Roux committed
22 23 24
	$(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
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 enb $^ $(LIBS)

vcd: utils.o vcd.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 vcd $^ $(LIBS)

Cedric Roux's avatar
Cedric Roux committed
34
.PHONY: all gui/gui.a view/view.a logger/logger.a filter/filter.a
Cedric Roux's avatar
Cedric Roux committed
35 36 37 38 39 40 41 42 43 44

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

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

clean:
52
	rm -f *.o core tracer_remote textlog enb vcd record replay
53
	rm -f extract_config
Cedric Roux's avatar
Cedric Roux committed
54 55 56
	cd gui && make clean
	cd view && make clean
	cd logger && make clean
Cedric Roux's avatar
Cedric Roux committed
57
	cd filter && make clean
58
	cd hacks && make clean