CC=gcc CFLAGS=-Wall -Werror CPPFLAGS+=-Isrc/include #LDFLAGS=-lm ODIR=obj SRC=src/sort.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: rm -f src/*.o sort Informe.pdf make -C doc clean .PHONY: all clean informe