From 20e0509d4e04fada3019639bc82d78b89f06b0fc Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 13 Aug 2013 17:14:11 +0200 Subject: erts: Add option to include nifs statically Both crypto and asn1 are supported. --- erts/emulator/utils/make_driver_tab | 55 +++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) (limited to 'erts/emulator/utils/make_driver_tab') diff --git a/erts/emulator/utils/make_driver_tab b/erts/emulator/utils/make_driver_tab index fbbfa3e49e..06928a3a4a 100755 --- a/erts/emulator/utils/make_driver_tab +++ b/erts/emulator/utils/make_driver_tab @@ -27,7 +27,9 @@ use File::Basename; # usage: make_driver_tab [-o filename] drivers... my $file = ""; +my $nif = ""; my @drivers = (); +my @nifs = (); while (@ARGV) { my $d = shift; @@ -35,6 +37,12 @@ while (@ARGV) { $file = shift or die("-o requires argument"); next; } + if ( $d =~ /^.*\.a$/ ) { + $d = basename $d; + $d =~ s/\.a$//; # strip .a + push(@nifs, $d); + next; + } $d = basename $d; $d =~ s/drv(\..*|)$//; # strip drv.* or just drv push(@drivers, $d); @@ -52,6 +60,7 @@ print < #include "global.h" + EOF # "extern" declarations @@ -68,4 +77,50 @@ foreach (@drivers) { print " NULL\n};\n"; +print <