mirror of
https://github.com/rvtr/ctr_eFuse.git
synced 2025-11-02 00:11:04 -04:00
ライブラリのマージプログラム修正(一つにまとめた方が良いかもしれない・・・)
git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-09-30%20-%20paladin.7z/paladin/ctr_eFuse@160 ff987cc8-cf2f-4642-8568-d52cce064691
This commit is contained in:
parent
2967910984
commit
537fcd9723
2
Makefile
2
Makefile
@ -68,7 +68,7 @@ PACKAGE_DIR = ./package
|
||||
# OPENSSL_DIR = ./openssl-1.0.0-beta2
|
||||
OPENSSL_DIR = ./openssl-0.9.8k
|
||||
|
||||
TARGET_LIB = lib_gen_id.a
|
||||
TARGET_LIB = libgenid.a
|
||||
|
||||
TARGET = gen_id
|
||||
|
||||
|
||||
@ -1,19 +1,36 @@
|
||||
#!/usr/bin/perl -w
|
||||
use strict;
|
||||
|
||||
my $lib_name = "../libgenid.a";
|
||||
|
||||
my @lib_list =
|
||||
(
|
||||
"../openssl-0.9.8k/libcrypto.a",
|
||||
"../openssl-0.9.8k/libssl.a",
|
||||
);
|
||||
|
||||
# move work directory
|
||||
print "cd dep_objs/\n";
|
||||
chdir 'dep_objs';
|
||||
|
||||
print "ar x ../openssl-0.9.8k/libcrypto.a\n";
|
||||
system "ar", "x", "../openssl-0.9.8k/libcrypto.a";
|
||||
# merge lib
|
||||
foreach ( @lib_list )
|
||||
{
|
||||
print "ar x $_\n";
|
||||
system "ar", "x", $_;
|
||||
if ( /libnf(.*)\.a/ )
|
||||
{
|
||||
print "mv sys-unix.o sys-unix-$1.o\n";
|
||||
system "mv", "sys-unix.o", "sys-unix-$1.o";
|
||||
}
|
||||
&merge_obj;
|
||||
}
|
||||
|
||||
print "ar x ../openssl-0.9.8k/libssl.a\n";
|
||||
system "ar", "x", "../openssl-0.9.8k/libssl.a";
|
||||
|
||||
my @object_files = glob "*.o";
|
||||
|
||||
print "ar rcs ../lib_gen_id.a @object_files\n";
|
||||
system "ar", "rcs", "../lib_gen_id.a", @object_files;
|
||||
|
||||
print "rm @object_files\n";
|
||||
system "rm", @object_files;
|
||||
sub merge_obj
|
||||
{
|
||||
my @object_files = glob "*.o";
|
||||
print "ar rcs $lib_name @object_files\n";
|
||||
system "ar", "rcs", $lib_name, @object_files;
|
||||
print "rm *.o\n";
|
||||
system "rm", @object_files;
|
||||
}
|
||||
|
||||
@ -1,45 +1,40 @@
|
||||
#!/usr/bin/perl -w
|
||||
use strict;
|
||||
|
||||
|
||||
my $lib_name = "../libgenid.a";
|
||||
|
||||
my @lib_list =
|
||||
(
|
||||
"../openssl-0.9.8k/libcrypto.a",
|
||||
"../openssl-0.9.8k/libssl.a",
|
||||
"/opt/nfast/c/ctd/gcc/lib/libnflog.a",
|
||||
"/opt/nfast/c/ctd/gcc/lib/libcutils.a",
|
||||
"/opt/nfast/c/ctd/gcc/lib/libnfstub.a",
|
||||
"/opt/nfast/c/ctd/gcc/lib/libnfkm.a"
|
||||
);
|
||||
|
||||
# move work directory
|
||||
print "cd dep_objs/\n";
|
||||
chdir 'dep_objs';
|
||||
|
||||
# openssl
|
||||
print "ar x ../openssl-0.9.8k/libcrypto.a\n";
|
||||
system "ar", "x", "../openssl-0.9.8k/libcrypto.a";
|
||||
|
||||
print "ar x ../openssl-0.9.8k/libssl.a\n";
|
||||
system "ar", "x", "../openssl-0.9.8k/libssl.a";
|
||||
# merge lib
|
||||
foreach ( @lib_list )
|
||||
{
|
||||
print "ar x $_\n";
|
||||
system "ar", "x", $_;
|
||||
if ( /libnf(.*)\.a/ )
|
||||
{
|
||||
print "mv sys-unix.o sys-unix-$1.o\n";
|
||||
system "mv", "sys-unix.o", "sys-unix-$1.o";
|
||||
}
|
||||
&merge_obj;
|
||||
}
|
||||
|
||||
# hsm
|
||||
print "ar x /opt/nfast/c/ctd/gcc/lib/libchknfast.a\n";
|
||||
system "ar", "x", "/opt/nfast/c/ctd/gcc/lib/libchknfast.a";
|
||||
|
||||
print "ar x /opt/nfast/c/ctd/gcc/lib/libnfhwcrhk.a\n";
|
||||
system "ar", "x", "/opt/nfast/c/ctd/gcc/lib/libnfhwcrhk.a";
|
||||
|
||||
print "ar x /opt/nfast/c/ctd/gcc/lib/libnfkm.a\n";
|
||||
system "ar", "x", "/opt/nfast/c/ctd/gcc/lib/libnfkm.a";
|
||||
|
||||
print "ar x /opt/nfast/c/ctd/gcc/lib/libnfkma.a\n";
|
||||
system "ar", "x", "/opt/nfast/c/ctd/gcc/lib/libnfkma.a";
|
||||
|
||||
print "ar x /opt/nfast/c/ctd/gcc/lib/librqcard.a\n";
|
||||
system "ar", "x", "/opt/nfast/c/ctd/gcc/lib/librqcard.a";
|
||||
|
||||
print "ar x /opt/nfast/c/ctd/gcc/lib/libnfstub.a\n";
|
||||
system "ar", "x", "/opt/nfast/c/ctd/gcc/lib/libnfstub.a";
|
||||
|
||||
print "ar x /opt/nfast/c/ctd/gcc/lib/libnflog.a\n";
|
||||
system "ar", "x", "/opt/nfast/c/ctd/gcc/lib/libnflog.a";
|
||||
|
||||
print "ar x /opt/nfast/c/ctd/gcc/lib/libcutils.a\n";
|
||||
system "ar", "x", "/opt/nfast/c/ctd/gcc/lib/libcutils.a";
|
||||
|
||||
my @object_files = glob "*.o";
|
||||
|
||||
print "ar rcs ../lib_gen_id.a @object_files\n";
|
||||
system "ar", "rcs", "../lib_gen_id.a", @object_files;
|
||||
|
||||
print "rm *.o\n";
|
||||
system "rm", @object_files;
|
||||
sub merge_obj
|
||||
{
|
||||
my @object_files = glob "*.o";
|
||||
print "ar rcs $lib_name @object_files\n";
|
||||
system "ar", "rcs", $lib_name, @object_files;
|
||||
print "rm *.o\n";
|
||||
system "rm", @object_files;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user