2018-11-05 15:04:04 -03:00
|
|
|
CC=gcc
|
|
|
|
CFLAGS=-Wall -Werror
|
|
|
|
CPPFLAGS+=-Isrc/include
|
|
|
|
#LDFLAGS=-lm
|
|
|
|
ODIR=obj
|
|
|
|
SRC=src/sort.c
|
|
|
|
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-06 14:31:13 -03:00
|
|
|
clean:
|
|
|
|
rm -f src/*.o sort Informe.pdf
|
2018-11-06 14:06:23 -03:00
|
|
|
make -C doc clean
|
|
|
|
|
2018-11-06 14:31:13 -03:00
|
|
|
.PHONY: all clean informe
|