Adding install and uninstall commands
This commit is contained in:
parent
896226f67f
commit
aab962a7b8
6
.gitignore
vendored
6
.gitignore
vendored
@ -52,3 +52,9 @@ Module.symvers
|
|||||||
Mkfile.old
|
Mkfile.old
|
||||||
dkms.conf
|
dkms.conf
|
||||||
|
|
||||||
|
# Output
|
||||||
|
obj/
|
||||||
|
bin/
|
||||||
|
|
||||||
|
# Vim
|
||||||
|
*.swp
|
||||||
|
18
Makefile
18
Makefile
@ -1,15 +1,15 @@
|
|||||||
CC = gcc
|
CC = gcc
|
||||||
FLAGS = -Wall -fpic
|
FLAGS = -Wall -g -fpic
|
||||||
LFLAGS = -s
|
LFLAGS =
|
||||||
|
|
||||||
all: bin/libcatwalk.so
|
all: bin/libcatwalk.so
|
||||||
|
|
||||||
bin/libcatwalk.so: obj/directions.o obj/grid.o obj/indicators.o obj/route.o
|
bin/libcatwalk.so: obj/directions.o obj/grid.o obj/indicators.o obj/route.o
|
||||||
-@mkdir -p $(@D)
|
@mkdir -p $(@D)
|
||||||
$(CC) -shared -o $@ $(FLAGS) $^ $(LFLAGS)
|
$(CC) -shared -o $@ $(FLAGS) $^ $(LFLAGS)
|
||||||
|
|
||||||
obj/%.o: src/%.c
|
obj/%.o: src/%.c
|
||||||
-@mkdir -p $(@D)
|
@mkdir -p $(@D)
|
||||||
$(CC) -o $@ -c $(FLAGS) $<
|
$(CC) -o $@ -c $(FLAGS) $<
|
||||||
|
|
||||||
obj/directions.o: src/directions.c
|
obj/directions.o: src/directions.c
|
||||||
@ -22,3 +22,13 @@ clean:
|
|||||||
rm -rf obj
|
rm -rf obj
|
||||||
mrproper: clean
|
mrproper: clean
|
||||||
rm -rf bin
|
rm -rf bin
|
||||||
|
|
||||||
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user