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
|
||||
dkms.conf
|
||||
|
||||
# Output
|
||||
obj/
|
||||
bin/
|
||||
|
||||
# Vim
|
||||
*.swp
|
||||
|
18
Makefile
18
Makefile
@ -1,15 +1,15 @@
|
||||
CC = gcc
|
||||
FLAGS = -Wall -fpic
|
||||
LFLAGS = -s
|
||||
FLAGS = -Wall -g -fpic
|
||||
LFLAGS =
|
||||
|
||||
all: bin/libcatwalk.so
|
||||
|
||||
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)
|
||||
|
||||
obj/%.o: src/%.c
|
||||
-@mkdir -p $(@D)
|
||||
@mkdir -p $(@D)
|
||||
$(CC) -o $@ -c $(FLAGS) $<
|
||||
|
||||
obj/directions.o: src/directions.c
|
||||
@ -22,3 +22,13 @@ clean:
|
||||
rm -rf obj
|
||||
mrproper: clean
|
||||
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