parent
7597d20c78
commit
8c11490e2d
@ -7,7 +7,7 @@
|
|||||||
#
|
#
|
||||||
# gmake -f makefile.mingw all
|
# gmake -f makefile.mingw all
|
||||||
# test.exe
|
# test.exe
|
||||||
# gmake -f makefile.mingw DESTDIR=c:\devel\libtom install
|
# gmake -f makefile.mingw PREFIX=c:\devel\libtom install
|
||||||
#
|
#
|
||||||
#Or:
|
#Or:
|
||||||
#
|
#
|
||||||
@ -15,7 +15,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
#The following can be overridden from command line e.g. make -f makefile.mingw CC=gcc ARFLAGS=rcs
|
#The following can be overridden from command line e.g. make -f makefile.mingw CC=gcc ARFLAGS=rcs
|
||||||
DESTDIR = c:\mingw
|
PREFIX = c:\mingw
|
||||||
CC = gcc
|
CC = gcc
|
||||||
AR = ar
|
AR = ar
|
||||||
ARFLAGS = r
|
ARFLAGS = r
|
||||||
@ -262,20 +262,20 @@ clean:
|
|||||||
|
|
||||||
#Install the library + headers
|
#Install the library + headers
|
||||||
install: $(LIBMAIN_S) $(LIBMAIN_I) $(LIBMAIN_D)
|
install: $(LIBMAIN_S) $(LIBMAIN_I) $(LIBMAIN_D)
|
||||||
cmd /c if not exist "$(DESTDIR)\bin" mkdir "$(DESTDIR)\bin"
|
cmd /c if not exist "$(PREFIX)\bin" mkdir "$(PREFIX)\bin"
|
||||||
cmd /c if not exist "$(DESTDIR)\lib" mkdir "$(DESTDIR)\lib"
|
cmd /c if not exist "$(PREFIX)\lib" mkdir "$(PREFIX)\lib"
|
||||||
cmd /c if not exist "$(DESTDIR)\include" mkdir "$(DESTDIR)\include"
|
cmd /c if not exist "$(PREFIX)\include" mkdir "$(PREFIX)\include"
|
||||||
copy /Y $(LIBMAIN_S) "$(DESTDIR)\lib"
|
copy /Y $(LIBMAIN_S) "$(PREFIX)\lib"
|
||||||
copy /Y $(LIBMAIN_I) "$(DESTDIR)\lib"
|
copy /Y $(LIBMAIN_I) "$(PREFIX)\lib"
|
||||||
copy /Y $(LIBMAIN_D) "$(DESTDIR)\bin"
|
copy /Y $(LIBMAIN_D) "$(PREFIX)\bin"
|
||||||
copy /Y src\headers\tomcrypt*.h "$(DESTDIR)\include"
|
copy /Y src\headers\tomcrypt*.h "$(PREFIX)\include"
|
||||||
|
|
||||||
#Install useful tools
|
#Install useful tools
|
||||||
install_bins: hashsum
|
install_bins: hashsum
|
||||||
cmd /c if not exist "$(DESTDIR)\bin" mkdir "$(DESTDIR)\bin"
|
cmd /c if not exist "$(PREFIX)\bin" mkdir "$(PREFIX)\bin"
|
||||||
copy /Y hashsum.exe "$(DESTDIR)\bin"
|
copy /Y hashsum.exe "$(PREFIX)\bin"
|
||||||
|
|
||||||
#Install documentation
|
#Install documentation
|
||||||
install_docs: doc/crypt.pdf
|
install_docs: doc/crypt.pdf
|
||||||
cmd /c if not exist "$(DESTDIR)\doc" mkdir "$(DESTDIR)\doc"
|
cmd /c if not exist "$(PREFIX)\doc" mkdir "$(PREFIX)\doc"
|
||||||
copy /Y doc\crypt.pdf "$(DESTDIR)\doc"
|
copy /Y doc\crypt.pdf "$(PREFIX)\doc"
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#
|
#
|
||||||
# nmake -f makefile.msvc all
|
# nmake -f makefile.msvc all
|
||||||
# test.exe
|
# test.exe
|
||||||
# nmake -f makefile.msvc DESTDIR=c:\devel\libtom install
|
# nmake -f makefile.msvc PREFIX=c:\devel\libtom install
|
||||||
#
|
#
|
||||||
#Or:
|
#Or:
|
||||||
#
|
#
|
||||||
@ -15,7 +15,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
#The following can be overridden from command line e.g. make -f makefile.msvc CC=gcc ARFLAGS=rcs
|
#The following can be overridden from command line e.g. make -f makefile.msvc CC=gcc ARFLAGS=rcs
|
||||||
DESTDIR = c:\devel
|
PREFIX = c:\devel
|
||||||
CFLAGS = /Ox /DUSE_LTM /DLTM_DESC /I../libtommath
|
CFLAGS = /Ox /DUSE_LTM /DLTM_DESC /I../libtommath
|
||||||
EXTRALIBS = ../libtommath/tommath.lib
|
EXTRALIBS = ../libtommath/tommath.lib
|
||||||
|
|
||||||
@ -249,18 +249,18 @@ clean:
|
|||||||
|
|
||||||
#Install the library + headers
|
#Install the library + headers
|
||||||
install: $(LIBMAIN_S)
|
install: $(LIBMAIN_S)
|
||||||
cmd /c if not exist "$(DESTDIR)\bin" mkdir "$(DESTDIR)\bin"
|
cmd /c if not exist "$(PREFIX)\bin" mkdir "$(PREFIX)\bin"
|
||||||
cmd /c if not exist "$(DESTDIR)\lib" mkdir "$(DESTDIR)\lib"
|
cmd /c if not exist "$(PREFIX)\lib" mkdir "$(PREFIX)\lib"
|
||||||
cmd /c if not exist "$(DESTDIR)\include" mkdir "$(DESTDIR)\include"
|
cmd /c if not exist "$(PREFIX)\include" mkdir "$(PREFIX)\include"
|
||||||
copy /Y $(LIBMAIN_S) "$(DESTDIR)\lib"
|
copy /Y $(LIBMAIN_S) "$(PREFIX)\lib"
|
||||||
copy /Y src\headers\tomcrypt*.h "$(DESTDIR)\include"
|
copy /Y src\headers\tomcrypt*.h "$(PREFIX)\include"
|
||||||
|
|
||||||
#Install useful tools
|
#Install useful tools
|
||||||
install_bins: hashsum
|
install_bins: hashsum
|
||||||
cmd /c if not exist "$(DESTDIR)\bin" mkdir "$(DESTDIR)\bin"
|
cmd /c if not exist "$(PREFIX)\bin" mkdir "$(PREFIX)\bin"
|
||||||
copy /Y hashsum.exe "$(DESTDIR)\bin"
|
copy /Y hashsum.exe "$(PREFIX)\bin"
|
||||||
|
|
||||||
#Install documentation
|
#Install documentation
|
||||||
install_docs: doc/crypt.pdf
|
install_docs: doc/crypt.pdf
|
||||||
cmd /c if not exist "$(DESTDIR)\doc" mkdir "$(DESTDIR)\doc"
|
cmd /c if not exist "$(PREFIX)\doc" mkdir "$(PREFIX)\doc"
|
||||||
copy /Y doc\crypt.pdf "$(DESTDIR)\doc"
|
copy /Y doc\crypt.pdf "$(PREFIX)\doc"
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
#
|
#
|
||||||
# CFLAGS="-DUSE_LTM -DLTM_DESC -I/path/to/libtommath" make -f makefile.shared all EXTRALIBS=/path/to/libtommath/libtommath.a
|
# CFLAGS="-DUSE_LTM -DLTM_DESC -I/path/to/libtommath" make -f makefile.shared all EXTRALIBS=/path/to/libtommath/libtommath.a
|
||||||
# ./test
|
# ./test
|
||||||
# make -f makefile.shared DESTDIR=/opt/libtom install
|
# make -f makefile.shared PREFIX=/opt/libtom install
|
||||||
#
|
#
|
||||||
|
|
||||||
PLATFORM := $(shell uname | sed -e 's/_.*//')
|
PLATFORM := $(shell uname | sed -e 's/_.*//')
|
||||||
@ -46,7 +46,7 @@ $(LIBNAME): $(OBJECTS)
|
|||||||
$(LT) --mode=link --tag=CC $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) `find ./src -type f -name "*.lo" | LC_ALL=C sort` $(EXTRALIBS) -o $@ -rpath $(LIBPATH) -version-info $(VERSION_LT)
|
$(LT) --mode=link --tag=CC $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) `find ./src -type f -name "*.lo" | LC_ALL=C sort` $(EXTRALIBS) -o $@ -rpath $(LIBPATH) -version-info $(VERSION_LT)
|
||||||
|
|
||||||
install: .common_install
|
install: .common_install
|
||||||
sed -e 's,^prefix=.*,prefix=$(DESTDIR),' -e 's,^Version:.*,Version: $(VERSION),' libtomcrypt.pc.in > libtomcrypt.pc
|
sed -e 's,^prefix=.*,prefix=$(PREFIX),' -e 's,^Version:.*,Version: $(VERSION),' libtomcrypt.pc.in > libtomcrypt.pc
|
||||||
install -d $(LIBPATH)/pkgconfig
|
install -d $(LIBPATH)/pkgconfig
|
||||||
install -m 644 libtomcrypt.pc $(LIBPATH)/pkgconfig/
|
install -m 644 libtomcrypt.pc $(LIBPATH)/pkgconfig/
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#
|
#
|
||||||
# make -f makefile.unix CFLAGS="-O3 -DUSE_LTM -DLTM_DESC -I/path/to/libtommath" EXTRALIBS=/path/to/libtommath/libtommath.a all
|
# make -f makefile.unix CFLAGS="-O3 -DUSE_LTM -DLTM_DESC -I/path/to/libtommath" EXTRALIBS=/path/to/libtommath/libtommath.a all
|
||||||
# ./test
|
# ./test
|
||||||
# make -f makefile.unix DESTDIR=/opt/libtom install
|
# make -f makefile.unix PREFIX=/opt/libtom install
|
||||||
#
|
#
|
||||||
#Or if you are using Intel C compiler you might need something like:
|
#Or if you are using Intel C compiler you might need something like:
|
||||||
#
|
#
|
||||||
@ -23,7 +23,8 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
#The following can be overridden from command line e.g. "make -f makefile.unix CC=gcc ARFLAGS=rcs"
|
#The following can be overridden from command line e.g. "make -f makefile.unix CC=gcc ARFLAGS=rcs"
|
||||||
DESTDIR = /usr/local
|
DESTDIR =
|
||||||
|
PREFIX = /usr/local
|
||||||
CC = cc
|
CC = cc
|
||||||
AR = ar
|
AR = ar
|
||||||
ARFLAGS = r
|
ARFLAGS = r
|
||||||
@ -266,17 +267,17 @@ clean:
|
|||||||
|
|
||||||
#Install the library + headers
|
#Install the library + headers
|
||||||
install: $(LIBMAIN_S) $(HEADERS)
|
install: $(LIBMAIN_S) $(HEADERS)
|
||||||
@mkdir -p $(DESTDIR)/include $(DESTDIR)/lib/pkgconfig
|
@mkdir -p $(PREFIX)/include $(PREFIX)/lib/pkgconfig
|
||||||
@cp $(LIBMAIN_S) $(DESTDIR)/lib/
|
@cp $(LIBMAIN_S) $(PREFIX)/lib/
|
||||||
@cp $(HEADERS) $(DESTDIR)/include/
|
@cp $(HEADERS) $(PREFIX)/include/
|
||||||
@sed -e 's,^prefix=.*,prefix=$(DESTDIR),' -e 's,^Version:.*,Version: $(VERSION),' libtomcrypt.pc.in > $(DESTDIR)/lib/pkgconfig/libtomcrypt.pc
|
@sed -e 's,^prefix=.*,prefix=$(PREFIX),' -e 's,^Version:.*,Version: $(VERSION),' libtomcrypt.pc.in > $(PREFIX)/lib/pkgconfig/libtomcrypt.pc
|
||||||
|
|
||||||
#Install useful tools
|
#Install useful tools
|
||||||
install_bins: hashsum
|
install_bins: hashsum
|
||||||
@mkdir -p $(DESTDIR)/bin
|
@mkdir -p $(PREFIX)/bin
|
||||||
@cp hashsum $(DESTDIR)/bin/
|
@cp hashsum $(PREFIX)/bin/
|
||||||
|
|
||||||
#Install documentation
|
#Install documentation
|
||||||
install_docs: doc/crypt.pdf
|
install_docs: doc/crypt.pdf
|
||||||
@mkdir -p $(DESTDIR)/share/doc/libtomcrypt/pdf
|
@mkdir -p $(PREFIX)/share/doc/libtomcrypt/pdf
|
||||||
@cp doc/crypt.pdf $(DESTDIR)/share/doc/libtomcrypt/pdf/
|
@cp doc/crypt.pdf $(PREFIX)/share/doc/libtomcrypt/pdf/
|
||||||
|
@ -130,11 +130,12 @@ TIMINGS=demos/timing.o
|
|||||||
#INCPATH The directory to install the header files for libtomcrypt.
|
#INCPATH The directory to install the header files for libtomcrypt.
|
||||||
#DATAPATH The directory to install the pdf docs.
|
#DATAPATH The directory to install the pdf docs.
|
||||||
#BINPATH The directory to install the binaries provided.
|
#BINPATH The directory to install the binaries provided.
|
||||||
DESTDIR ?= /usr/local
|
DESTDIR ?=
|
||||||
LIBPATH ?= $(DESTDIR)/lib
|
PREFIX ?= /usr/local
|
||||||
INCPATH ?= $(DESTDIR)/include
|
LIBPATH ?= $(DESTDIR)$(PREFIX)/lib
|
||||||
DATAPATH ?= $(DESTDIR)/share/doc/libtomcrypt/pdf
|
INCPATH ?= $(DESTDIR)$(PREFIX)/include
|
||||||
BINPATH ?= $(DESTDIR)/bin
|
DATAPATH ?= $(DESTDIR)$(PREFIX)/share/doc/libtomcrypt/pdf
|
||||||
|
BINPATH ?= $(DESTDIR)$(PREFIX)/bin
|
||||||
|
|
||||||
#Who do we install as?
|
#Who do we install as?
|
||||||
ifdef INSTALL_USER
|
ifdef INSTALL_USER
|
||||||
|
Loading…
x
Reference in New Issue
Block a user