sort/Makefile

29 lines
462 B
Makefile
Raw Normal View History

2018-11-05 15:04:04 -03:00
CC=gcc
CFLAGS=-Wall -Werror
CPPFLAGS+=-Isrc/include
#LDFLAGS=-lm
SRC=src/sort.c
OBJ=$(SRC:.c=.o)
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:
# if pdflatex is installed create the informe
ifneq (, $(shell which pdflatex))
2018-11-06 14:06:23 -03:00
make -C doc
mv doc/Informe.pdf Informe.pdf
endif
2018-11-06 14:06:23 -03:00
clean: cleansort cleaninforme
cleansort:
rm -f src/*.o sort Informe.pdf
cleaninforme:
2018-11-06 14:06:23 -03:00
make -C doc clean
.PHONY: all sort informe clean cleansort cleaninforme