sort/Makefile
2018-11-11 13:44:24 -03:00

29 lines
475 B
Makefile

CC=gcc
CFLAGS=-Wall -Isrc/include -DDEBUG -g
#LDFLAGS=-lm
SRC=src/sort.c src/random.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