Makefile 1.25 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

Cedric Roux's avatar
Cedric Roux committed
8
all: record replay 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

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

Cedric Roux's avatar
Cedric Roux committed
16
textlog: utils.o textlog.o database.o event.o handler.o config.o \
Cedric Roux's avatar
Cedric Roux committed
17
18
         event_selector.o view/view.a gui/gui.a logger/logger.a \
         filter/filter.a
Cedric Roux's avatar
Cedric Roux committed
19
20
21
	$(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
22
23
         event_selector.o view/view.a gui/gui.a logger/logger.a \
         filter/filter.a
Cedric Roux's avatar
Cedric Roux committed
24
25
26
	$(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
27
28
         event_selector.o view/view.a gui/gui.a logger/logger.a \
         filter/filter.a
Cedric Roux's avatar
Cedric Roux committed
29
30
	$(CC) $(CFLAGS) -o vcd $^ $(LIBS)

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

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

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

clean:
Cedric Roux's avatar
Cedric Roux committed
49
	rm -f *.o core tracer_remote textlog enb vcd record replay
Cedric Roux's avatar
Cedric Roux committed
50
51
52
	cd gui && make clean
	cd view && make clean
	cd logger && make clean
Cedric Roux's avatar
Cedric Roux committed
53
	cd filter && make clean