diff --git a/Makefile b/Makefile index def8cdf..be97201 100644 --- a/Makefile +++ b/Makefile @@ -3,11 +3,13 @@ FLAGS = -Wall -fpic LFLAGS = -s all: bin/libcatwalk.so - + bin/libcatwalk.so: obj/directions.o obj/grid.o obj/indicators.o obj/route.o + -@mkdir -p $(@D) $(CC) -shared -o $@ $(FLAGS) $^ $(LFLAGS) obj/%.o: src/%.c + -@mkdir -p $(@D) $(CC) -o $@ -c $(FLAGS) $< obj/directions.o: src/directions.c @@ -17,6 +19,6 @@ obj/route.o: src/route.c .PHONY: clean mrproper clean: - rm -f obj/* + rm -rf obj mrproper: clean - rm -f bin/* + rm -rf bin