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@204 ff987cc8-cf2f-4642-8568-d52cce064691
39 lines
700 B
Perl
39 lines
700 B
Perl
#!/usr/bin/perl -w
|
|
use strict;
|
|
|
|
my $openssl_dir = "../openssl-1.0.0-beta5/";
|
|
|
|
my $lib_name = "../libgenid.a";
|
|
|
|
my @lib_list =
|
|
(
|
|
$openssl_dir . "libcrypto.a",
|
|
$openssl_dir . "libssl.a",
|
|
);
|
|
|
|
# move work directory
|
|
print "cd dep_objs/\n";
|
|
chdir 'dep_objs';
|
|
|
|
# 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;
|
|
}
|
|
|
|
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;
|
|
}
|