File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ ifndef RANLIB
2626RANLIB: =$(CROSS_COMPILE ) ranlib
2727endif
2828INSTALL_CMD = install
29+ UNINSTALL_CMD = rm
2930
3031# Output filenames for various targets.
3132ifndef LIBNAME
@@ -93,6 +94,8 @@ install: .common_install
9394
9495install_bins : .common_install_bins
9596
97+ uninstall : .common_uninstall
98+
9699profile :
97100 CFLAGS=" $( CFLAGS) -fprofile-generate" $(MAKE ) timing EXTRALIBS=" $( EXTRALIBS) -lgcov"
98101 ./timing
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ ifndef LT
2525endif
2626LTCOMPILE = $(LT) --mode=compile --tag=CC $(CC)
2727INSTALL_CMD = $(LT) --mode=install install
28+ UNINSTALL_CMD = $(LT) --mode=uninstall rm
2829
2930#Output filenames for various targets.
3031ifndef LIBNAME
@@ -52,6 +53,9 @@ install: .common_install
5253
5354install_bins: .common_install_bins
5455
56+ uninstall: .common_uninstall
57+ rm $(DESTDIR)$(LIBPATH)/pkgconfig/libtomcrypt.pc
58+
5559test: $(LIBNAME) $(TOBJECTS)
5660 $(LT) --mode=link --tag=CC $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TEST) $(TOBJECTS) $(LIBNAME) $(EXTRALIBS)
5761
Original file line number Diff line number Diff line change 3030ifndef INSTALL_CMD
3131$(error your makefile must define INSTALL_CMD)
3232endif
33+ ifndef UNINSTALL_CMD
34+ $(error your makefile must define UNINSTALL_CMD)
35+ endif
3336
3437ifndef EXTRALIBS
3538ifneq ($(shell echo $(CFLAGS ) | grep USE_LTM) ,)
@@ -383,6 +386,12 @@ install_docs: doc/crypt.pdf
383386install_hooks :
384387 for s in ` ls hooks/` ; do ln -s ../../hooks/$$ s .git/hooks/$$ s; done
385388
389+
390+ HEADER_FILES =$(notdir $(HEADERS ) )
391+ .common_uninstall :
392+ $(UNINSTALL_CMD ) $(LIBPATH ) /$(LIBNAME )
393+ rm $(HEADER_FILES:%=$(INCPATH ) /% )
394+
386395# This rule cleans the source tree of all compiled code, not including the pdf
387396# documentation.
388397clean :
You can’t perform that action at this time.
0 commit comments