Makefile 1.08 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
8
9
10
LIBS=-lX11 -lm -lpng -lXft

all: textlog enb vcd

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

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

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

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

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