Makefile 945 Bytes
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
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
LIBS=-lX11 -lm -lpng -lXft

all: textlog enb vcd

textlog: utils.o textlog.o database.o event.o handler.o config.o \
         event_selector.o view/view.a gui/gui.a logger/logger.a
	$(CC) $(CFLAGS) -o textlog $^ $(LIBS)

enb: utils.o enb.o database.o event.o handler.o config.o \
         event_selector.o view/view.a gui/gui.a logger/logger.a
	$(CC) $(CFLAGS) -o enb $^ $(LIBS)

vcd: utils.o vcd.o database.o event.o handler.o config.o \
         event_selector.o view/view.a gui/gui.a logger/logger.a
	$(CC) $(CFLAGS) -o vcd $^ $(LIBS)

.PHONY: all gui/gui.a view/view.a logger/logger.a

gui/gui.a:
	cd gui && make

view/view.a:
	cd view && make

logger/logger.a:
	cd logger && make

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

clean:
Cedric Roux's avatar
Cedric Roux committed
37
38
39
40
	rm -f *.o core tracer_remote textlog enb vcd
	cd gui && make clean
	cd view && make clean
	cd logger && make clean