update VERSION variables in makefiles
VERSION is now VERSION_PC the new VERSION contains the entire string of SCRYPT
This commit is contained in:
parent
a8965f048a
commit
e53858c740
@ -274,10 +274,10 @@ sub patch_makefile {
|
|||||||
return $content;
|
return $content;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub version_form_tomcrypt_h {
|
sub version_from_tomcrypt_h {
|
||||||
my $h = read_file(shift);
|
my $h = read_file(shift);
|
||||||
if ($h =~ /\n#define\s*SCRYPT\s*"([0-9]+)\.([0-9]+)\.([0-9]+).*"/s) {
|
if ($h =~ /\n#define\s*SCRYPT\s*"([0-9]+)\.([0-9]+)\.([0-9]+)(.*)"/s) {
|
||||||
return "VERSION=$1.$2.$3", "VERSION_LT=0:$1$2";
|
return "VERSION_PC=$1.$2.$3", "VERSION_LT=0:$1$2", "VERSION=$1.$2.$3$4";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
die "#define SCRYPT not found in tomcrypt.h";
|
die "#define SCRYPT not found in tomcrypt.h";
|
||||||
@ -304,7 +304,7 @@ sub process_makefiles {
|
|||||||
my $var_to = prepare_variable("TOBJECTS", sort map { my $x = $_; $x =~ s/\.c$/.o/; $x } @t);
|
my $var_to = prepare_variable("TOBJECTS", sort map { my $x = $_; $x =~ s/\.c$/.o/; $x } @t);
|
||||||
(my $var_tobj = $var_to) =~ s/\.o\b/.obj/sg;
|
(my $var_tobj = $var_to) =~ s/\.o\b/.obj/sg;
|
||||||
|
|
||||||
my @ver_version = version_form_tomcrypt_h("src/headers/tomcrypt.h");
|
my @ver_version = version_from_tomcrypt_h("src/headers/tomcrypt.h");
|
||||||
|
|
||||||
# update MSVC project files
|
# update MSVC project files
|
||||||
my $msvc_files = prepare_msvc_files_xml(\@all, qr/tab\.c$/, ['Debug|Win32', 'Release|Win32', 'Debug|x64', 'Release|x64']);
|
my $msvc_files = prepare_msvc_files_xml(\@all, qr/tab\.c$/, ['Debug|Win32', 'Release|Win32', 'Debug|x64', 'Release|x64']);
|
||||||
|
@ -27,7 +27,7 @@ EXTRALIBS = -L../libtommath -ltommath
|
|||||||
#Compilation flags
|
#Compilation flags
|
||||||
LTC_CFLAGS = $(CFLAGS) -Isrc/headers -Itests -DLTC_SOURCE
|
LTC_CFLAGS = $(CFLAGS) -Isrc/headers -Itests -DLTC_SOURCE
|
||||||
LTC_LDFLAGS = $(LDFLAGS) $(EXTRALIBS)
|
LTC_LDFLAGS = $(LDFLAGS) $(EXTRALIBS)
|
||||||
VERSION=1.18.0
|
VERSION=1.18.0-rc1
|
||||||
|
|
||||||
#Libraries to be created
|
#Libraries to be created
|
||||||
LIBMAIN_S =libtomcrypt.a
|
LIBMAIN_S =libtomcrypt.a
|
||||||
|
@ -22,7 +22,7 @@ EXTRALIBS = ../libtommath/tommath.lib
|
|||||||
#Compilation flags
|
#Compilation flags
|
||||||
LTC_CFLAGS = $(CFLAGS) /nologo /Isrc/headers/ /Itests/ /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_DEPRECATE /DLTC_SOURCE /W3
|
LTC_CFLAGS = $(CFLAGS) /nologo /Isrc/headers/ /Itests/ /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_DEPRECATE /DLTC_SOURCE /W3
|
||||||
LTC_LDFLAGS = advapi32.lib $(EXTRALIBS)
|
LTC_LDFLAGS = advapi32.lib $(EXTRALIBS)
|
||||||
VERSION=1.18.0
|
VERSION=1.18.0-rc1
|
||||||
|
|
||||||
#Libraries to be created (this makefile builds only static libraries)
|
#Libraries to be created (this makefile builds only static libraries)
|
||||||
LIBMAIN_S =tomcrypt.lib
|
LIBMAIN_S =tomcrypt.lib
|
||||||
|
@ -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=$(PREFIX),' -e 's,^Version:.*,Version: $(VERSION),' libtomcrypt.pc.in > libtomcrypt.pc
|
sed -e 's,^prefix=.*,prefix=$(PREFIX),' -e 's,^Version:.*,Version: $(VERSION_PC),' libtomcrypt.pc.in > libtomcrypt.pc
|
||||||
install -d $(DESTDIR)$(LIBPATH)/pkgconfig
|
install -d $(DESTDIR)$(LIBPATH)/pkgconfig
|
||||||
install -m 644 libtomcrypt.pc $(DESTDIR)$(LIBPATH)/pkgconfig/
|
install -m 644 libtomcrypt.pc $(DESTDIR)$(LIBPATH)/pkgconfig/
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ EXTRALIBS = ../libtommath/libtommath.a
|
|||||||
#Compilation flags
|
#Compilation flags
|
||||||
LTC_CFLAGS = $(CFLAGS) -Isrc/headers -Itests -DLTC_SOURCE
|
LTC_CFLAGS = $(CFLAGS) -Isrc/headers -Itests -DLTC_SOURCE
|
||||||
LTC_LDFLAGS = $(LDFLAGS) $(EXTRALIBS)
|
LTC_LDFLAGS = $(LDFLAGS) $(EXTRALIBS)
|
||||||
VERSION=1.18.0
|
VERSION=1.18.0-rc1
|
||||||
|
|
||||||
#Libraries to be created (this makefile builds only static libraries)
|
#Libraries to be created (this makefile builds only static libraries)
|
||||||
LIBMAIN_S =libtomcrypt.a
|
LIBMAIN_S =libtomcrypt.a
|
||||||
|
@ -2,8 +2,9 @@
|
|||||||
# Include makefile used by makefile + makefile.shared
|
# Include makefile used by makefile + makefile.shared
|
||||||
# (GNU make only)
|
# (GNU make only)
|
||||||
|
|
||||||
# The version - BEWARE: VERSION and VERSION_LT are updated via ./updatemakes.sh
|
# The version - BEWARE: VERSION, VERSION_PC and VERSION_LT are updated via ./updatemakes.sh
|
||||||
VERSION=1.18.0
|
VERSION=1.18.0-rc1
|
||||||
|
VERSION_PC=1.18.0
|
||||||
# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
|
# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
|
||||||
VERSION_LT=0:118
|
VERSION_LT=0:118
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user