install per default to `/usr/local`

This commit is contained in:
Steffen Jaeckel 2017-05-09 14:24:41 +02:00
parent ddddcf2e71
commit d2e8179c21
2 changed files with 8 additions and 7 deletions

View File

@ -71,9 +71,10 @@ test_standalone: CFLAGS+=-DLTM_DEMO_TEST_VS_MTEST=0
#LIBPATH-The directory for libtommath to be installed to.
#INCPATH-The directory to install the header files for libtommath.
#DATAPATH-The directory to install the pdf docs.
LIBPATH?=/usr/lib
INCPATH?=/usr/include
DATAPATH?=/usr/share/doc/libtommath/pdf
DESTDIR ?= /usr/local
LIBPATH ?= $(DESTDIR)/lib
INCPATH ?= $(DESTDIR)/include
DATAPATH ?= $(DESTDIR)/share/doc/libtommath/pdf
#make the code coverage of the library
#

View File

@ -51,10 +51,10 @@ $(LIBNAME): $(OBJECTS)
$(LT) --mode=link --tag=CC $(CC) $(LDFLAGS) *.lo -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION_SO)
install: $(LIBNAME)
install -d $(DESTDIR)$(LIBPATH)
install -d $(DESTDIR)$(INCPATH)
$(LT) --mode=install install -c $(LIBNAME) $(DESTDIR)$(LIBPATH)/$(LIBNAME)
install -m 644 $(HEADERS_PUB) $(DESTDIR)$(INCPATH)
install -d $(LIBPATH)
install -d $(INCPATH)
$(LT) --mode=install install -c $(LIBNAME) $(LIBPATH)/$(LIBNAME)
install -m 644 $(HEADERS_PUB) $(INCPATH)
test: $(LIBNAME) demo/demo.o
$(CC) $(CFLAGS) -c demo/demo.c -o demo/demo.o