2021-06-19 17:54:33 -04:00
|
|
|
CC=clang
|
2021-06-26 19:17:50 -04:00
|
|
|
CFLAGS=-Wall -Isrc/include -DDEBUG -g -std=c11
|
2021-06-19 19:13:53 -04:00
|
|
|
LDFLAGS=
|
|
|
|
FILENAME=myshellin
|
2021-06-27 22:46:03 -04:00
|
|
|
SRC=src/myshellin.c src/loop.c src/console_line.c src/array.c src/builtins.c src/launch.c
|
2021-06-19 17:54:33 -04:00
|
|
|
OBJ=$(SRC:.c=.o)
|
|
|
|
|
2021-06-19 19:13:53 -04:00
|
|
|
all: myshellin
|
2021-06-19 17:54:33 -04:00
|
|
|
|
|
|
|
myshellin: $(OBJ)
|
2021-06-19 19:13:53 -04:00
|
|
|
$(CC) $(CFLAGS) -o $(FILENAME) $^ $(LDFLAGS)
|
2021-06-19 17:54:33 -04:00
|
|
|
|
|
|
|
informe:
|
|
|
|
# if pdflatex is installed create the informe
|
|
|
|
ifneq (, $(shell which pdflatex))
|
|
|
|
make -C doc
|
|
|
|
mv doc/Informe.pdf Informe.pdf
|
2021-06-27 16:06:07 -04:00
|
|
|
else ifneq (, $(shell which pdftex))
|
|
|
|
make -C doc
|
|
|
|
mv doc/Informe.pdf Informe.pdf
|
2021-06-19 17:54:33 -04:00
|
|
|
endif
|
|
|
|
|
2021-06-19 19:13:53 -04:00
|
|
|
clean: cleanmyshellin
|
2021-06-19 17:54:33 -04:00
|
|
|
|
|
|
|
cleanmyshellin:
|
2021-06-19 20:59:34 -04:00
|
|
|
rm -f src/*.o $(FILENAME)
|
2021-06-19 17:54:33 -04:00
|
|
|
|
|
|
|
cleaninforme:
|
|
|
|
make -C doc clean
|
|
|
|
rm -f Informe.pdf
|
|
|
|
|
|
|
|
.PHONY: all myshellin informe clean cleanmyshellin cleaninforme
|