libcatwalk/Makefile

35 lines
731 B
Makefile
Raw Normal View History

2021-10-05 18:50:05 +02:00
CC = gcc
2021-10-07 20:28:36 +02:00
FLAGS = -Wall -g -fpic
LFLAGS =
all: bin/libcatwalk.so
2021-10-06 20:57:01 +02:00
bin/libcatwalk.so: obj/directions.o obj/grid.o obj/indicators.o obj/route.o
2021-10-07 20:28:36 +02:00
@mkdir -p $(@D)
$(CC) -shared -o $@ $(FLAGS) $^ $(LFLAGS)
obj/%.o: src/%.c
2021-10-07 20:28:36 +02:00
@mkdir -p $(@D)
$(CC) -o $@ -c $(FLAGS) $<
obj/directions.o: src/directions.c
obj/grid.o: src/grid.c
obj/indicators.o: src/indicators.c
obj/route.o: src/route.c
.PHONY: clean mrproper
clean:
2021-10-06 20:57:01 +02:00
rm -rf obj
mrproper: clean
2021-10-06 20:57:01 +02:00
rm -rf bin
2021-10-07 20:28:36 +02:00
install: bin/libcatwalk.so
@mkdir -p /usr/local/include/catwalk/
install include/*.h /usr/local/include/catwalk/
@mkdir -p /usr/local/lib
install bin/libcatwalk.so /usr/local/lib/
uninstall:
-rm -rf /usr/local/include/catwalk
-rm -f /usr/local/lib/libcatwalk.so