Skip to content

Commit

Permalink
[+] adding rules to install and uninstall the libs
Browse files Browse the repository at this point in the history
  • Loading branch information
Ximaz committed Mar 30, 2024
1 parent 2f3d8e9 commit a392ab9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
## Makefile
##

LIB_PATH := /usr/local/lib/list
INCLUDE_PATH := /usr/local/include/list

CC := gcc
CPPFLAGS := -Iinclude/

Expand Down Expand Up @@ -45,6 +48,15 @@ tests_run: $(OBJS) $(TESTS_OBJS)
CRITERION_NO_EARLY_EXIT=1 ./unit_tests
gcovr -e tests .

install: all
mkdir -p $(LIB_PATH) $(INCLUDE_PATH)
mv liblist.a $(LIB_PATH)
mv liblist.so $(LIB_PATH)
cp include/list.h $(INCLUDE_PATH)

uninstall:
$(RM) $(LIB_PATH) $(INCLUDE_PATH)

valgrind: tests_run
valgrind $(VALGRIND_FLAGS) ./unit_tests

Expand Down

0 comments on commit a392ab9

Please sign in to comment.