2018-12-04 14:40:14 -03:00
|
|
|
CC=gcc
|
|
|
|
CFLAGS=-Wall -Isrc/include -DDEBUG -g
|
|
|
|
LDFLAGS=-lm
|
2018-12-08 19:35:02 -03:00
|
|
|
SRC=src/points.c src/timer.c src/read_file.c src/distance.c src/brute_force.c
|
2018-12-04 14:40:14 -03:00
|
|
|
OBJ=$(SRC:.c=.o)
|
|
|
|
|
|
|
|
all: points informe
|
|
|
|
|
|
|
|
points: $(OBJ)
|
|
|
|
$(CC) -o $@ $^ $(LDFLAGS)
|
|
|
|
|
|
|
|
informe:
|
|
|
|
# if pdflatex is installed create the informe
|
|
|
|
ifneq (, $(shell which pdflatex))
|
|
|
|
make -C doc
|
|
|
|
mv doc/Informe.pdf Informe.pdf
|
|
|
|
endif
|
|
|
|
|
|
|
|
test:
|
|
|
|
make -C test
|
|
|
|
test/test
|
|
|
|
|
|
|
|
clean: cleanpoints cleaninforme cleantest
|
|
|
|
|
|
|
|
cleanpoints:
|
|
|
|
rm -f src/*.o points
|
|
|
|
|
|
|
|
cleaninforme:
|
|
|
|
make -C doc clean
|
|
|
|
rm -f Informe.pdf
|
|
|
|
|
|
|
|
cleantest:
|
|
|
|
make -C test clean
|
|
|
|
|
|
|
|
.PHONY: all points informe test clean cleanpoints cleaninforme cleantest
|