2018-11-05 15:04:04 -03:00
|
|
|
CC=gcc
|
2018-11-11 13:44:24 -03:00
|
|
|
CFLAGS=-Wall -Isrc/include -DDEBUG -g
|
2018-11-18 17:57:59 -03:00
|
|
|
LDFLAGS=-lm
|
2018-11-20 12:16:29 -03:00
|
|
|
SRC=src/sort.c src/random.c src/bubble_sort.c src/timer.c src/counting_sort.c src/quick_sort.c src/merge_sort.c src/bitonic_sort.c src/selection_sort.c
|
2018-11-05 15:04:04 -03:00
|
|
|
OBJ=$(SRC:.c=.o)
|
|
|
|
|
2018-11-06 14:31:13 -03:00
|
|
|
all: sort informe
|
|
|
|
|
2018-11-05 15:04:04 -03:00
|
|
|
sort: $(OBJ)
|
|
|
|
$(CC) -o $@ $^ $(LDFLAGS)
|
|
|
|
|
2018-11-06 14:06:23 -03:00
|
|
|
informe:
|
2018-11-06 14:31:13 -03:00
|
|
|
# if pdflatex is installed create the informe
|
|
|
|
ifneq (, $(shell which pdflatex))
|
2018-11-06 14:06:23 -03:00
|
|
|
make -C doc
|
2018-11-06 14:31:13 -03:00
|
|
|
mv doc/Informe.pdf Informe.pdf
|
|
|
|
endif
|
2018-11-06 14:06:23 -03:00
|
|
|
|
2018-11-11 18:20:01 -03:00
|
|
|
test:
|
|
|
|
make -C test
|
|
|
|
test/test
|
|
|
|
|
|
|
|
clean: cleansort cleaninforme cleantest
|
2018-11-06 14:34:22 -03:00
|
|
|
|
|
|
|
cleansort:
|
2018-11-07 14:48:14 -03:00
|
|
|
rm -f src/*.o sort
|
2018-11-06 14:34:22 -03:00
|
|
|
|
|
|
|
cleaninforme:
|
2018-11-06 14:06:23 -03:00
|
|
|
make -C doc clean
|
2018-11-07 14:48:14 -03:00
|
|
|
rm -f Informe.pdf
|
2018-11-06 14:06:23 -03:00
|
|
|
|
2018-11-11 18:20:01 -03:00
|
|
|
cleantest:
|
|
|
|
make -C test clean
|
|
|
|
|
|
|
|
.PHONY: all sort informe test clean cleansort cleaninforme cleantest
|