add 'uninstall' make target
[skip ci]
This commit is contained in:
parent
3806629e9e
commit
221f7f223d
3
makefile
3
makefile
@ -26,6 +26,7 @@ ifndef RANLIB
|
|||||||
RANLIB:=$(CROSS_COMPILE)ranlib
|
RANLIB:=$(CROSS_COMPILE)ranlib
|
||||||
endif
|
endif
|
||||||
INSTALL_CMD = install
|
INSTALL_CMD = install
|
||||||
|
UNINSTALL_CMD = rm
|
||||||
|
|
||||||
#Output filenames for various targets.
|
#Output filenames for various targets.
|
||||||
ifndef LIBNAME
|
ifndef LIBNAME
|
||||||
@ -93,6 +94,8 @@ install: .common_install
|
|||||||
|
|
||||||
install_bins: .common_install_bins
|
install_bins: .common_install_bins
|
||||||
|
|
||||||
|
uninstall: .common_uninstall
|
||||||
|
|
||||||
profile:
|
profile:
|
||||||
CFLAGS="$(CFLAGS) -fprofile-generate" $(MAKE) timing EXTRALIBS="$(EXTRALIBS) -lgcov"
|
CFLAGS="$(CFLAGS) -fprofile-generate" $(MAKE) timing EXTRALIBS="$(EXTRALIBS) -lgcov"
|
||||||
./timing
|
./timing
|
||||||
|
@ -25,6 +25,7 @@ ifndef LT
|
|||||||
endif
|
endif
|
||||||
LTCOMPILE = $(LT) --mode=compile --tag=CC $(CC)
|
LTCOMPILE = $(LT) --mode=compile --tag=CC $(CC)
|
||||||
INSTALL_CMD = $(LT) --mode=install install
|
INSTALL_CMD = $(LT) --mode=install install
|
||||||
|
UNINSTALL_CMD = $(LT) --mode=uninstall rm
|
||||||
|
|
||||||
#Output filenames for various targets.
|
#Output filenames for various targets.
|
||||||
ifndef LIBNAME
|
ifndef LIBNAME
|
||||||
@ -52,6 +53,9 @@ install: .common_install
|
|||||||
|
|
||||||
install_bins: .common_install_bins
|
install_bins: .common_install_bins
|
||||||
|
|
||||||
|
uninstall: .common_uninstall
|
||||||
|
rm $(DESTDIR)$(LIBPATH)/pkgconfig/libtomcrypt.pc
|
||||||
|
|
||||||
test: $(LIBNAME) $(TOBJECTS)
|
test: $(LIBNAME) $(TOBJECTS)
|
||||||
$(LT) --mode=link --tag=CC $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TEST) $(TOBJECTS) $(LIBNAME) $(EXTRALIBS)
|
$(LT) --mode=link --tag=CC $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TEST) $(TOBJECTS) $(LIBNAME) $(EXTRALIBS)
|
||||||
|
|
||||||
|
@ -30,6 +30,9 @@ endif
|
|||||||
ifndef INSTALL_CMD
|
ifndef INSTALL_CMD
|
||||||
$(error your makefile must define INSTALL_CMD)
|
$(error your makefile must define INSTALL_CMD)
|
||||||
endif
|
endif
|
||||||
|
ifndef UNINSTALL_CMD
|
||||||
|
$(error your makefile must define UNINSTALL_CMD)
|
||||||
|
endif
|
||||||
|
|
||||||
ifndef EXTRALIBS
|
ifndef EXTRALIBS
|
||||||
ifneq ($(shell echo $(CFLAGS) | grep USE_LTM),)
|
ifneq ($(shell echo $(CFLAGS) | grep USE_LTM),)
|
||||||
@ -383,6 +386,12 @@ install_docs: doc/crypt.pdf
|
|||||||
install_hooks:
|
install_hooks:
|
||||||
for s in `ls hooks/`; do ln -s ../../hooks/$$s .git/hooks/$$s; done
|
for s in `ls hooks/`; do ln -s ../../hooks/$$s .git/hooks/$$s; done
|
||||||
|
|
||||||
|
|
||||||
|
HEADER_FILES=$(notdir $(HEADERS))
|
||||||
|
.common_uninstall:
|
||||||
|
$(UNINSTALL_CMD) $(LIBPATH)/$(LIBNAME)
|
||||||
|
rm $(HEADER_FILES:%=$(INCPATH)/%)
|
||||||
|
|
||||||
#This rule cleans the source tree of all compiled code, not including the pdf
|
#This rule cleans the source tree of all compiled code, not including the pdf
|
||||||
#documentation.
|
#documentation.
|
||||||
clean:
|
clean:
|
||||||
|
Loading…
Reference in New Issue
Block a user