This repository has been archived on 2019-08-09. You can view files and clone it, but cannot push or open issues or pull requests.
s6-pa-tp/TP8/Makefile
2017-03-29 11:43:05 +02:00

28 lines
434 B
Makefile

all: main pdfs dots
main: main.c libtrees.a
gcc $^ -o $@
part2: part2.c libtrees.a
gcc $^ -o $@
%.o: %.c
gcc -c $^ -o $@
lib%.a: %.o
ar rcs $@ $^
pdfs: $(patsubst %.txt,%.pdf,$(shell ls samples/*.txt))
dots: $(patsubst %.txt,%.dot,$(shell ls samples/*.txt))
samples/%.pdf: samples/%.dot
dot -Tpdf $< -o $@
samples/%.dot: samples/%.txt part2
./part2 $<
.PHONY: clean
clean:
rm -r lib*.a *.o samples/*.dot samples/*.pdf