sort/Makefile

29 lines
505 B
Makefile

CC=gcc
CFLAGS=-Wall -Isrc/include -DDEBUG -g
#LDFLAGS=-lm
SRC=src/sort.c src/random.c src/bubble_sort.c src/timer.c
OBJ=$(SRC:.c=.o)
all: sort informe
sort: $(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
clean: cleansort cleaninforme
cleansort:
rm -f src/*.o sort
cleaninforme:
make -C doc clean
rm -f Informe.pdf
.PHONY: all sort informe clean cleansort cleaninforme