Skip to content
Snippets Groups Projects
Makefile 1.08 KiB
Newer Older
Cedric Roux's avatar
Cedric Roux committed
CC=gcc
CFLAGS=-Wall -g -pthread -DT_TRACER -I.
Cedric Roux's avatar
Cedric Roux committed
#CFLAGS += -O3 -ffast-math -fomit-frame-pointer
Cedric Roux's avatar
Cedric Roux committed
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
         event_selector.o view/view.a gui/gui.a logger/logger.a \
         filter/filter.a
Cedric Roux's avatar
Cedric Roux committed
	$(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
         event_selector.o view/view.a gui/gui.a logger/logger.a \
         filter/filter.a
Cedric Roux's avatar
Cedric Roux committed
	$(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
         event_selector.o view/view.a gui/gui.a logger/logger.a \
         filter/filter.a
Cedric Roux's avatar
Cedric Roux committed
	$(CC) $(CFLAGS) -o vcd $^ $(LIBS)

Cedric Roux's avatar
Cedric Roux committed
.PHONY: all gui/gui.a view/view.a logger/logger.a filter/filter.a
Cedric Roux's avatar
Cedric Roux committed

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

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

clean:
Cedric Roux's avatar
Cedric Roux committed
	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
	cd filter && make clean