Makefile 1.17 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
9
10
11
all: record textlog enb vcd

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

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

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

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

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

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