makefiles: Use the STATICLIB variable for static import libraries.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
c60d604544
commit
518f9a12c1
|
@ -1,4 +1,4 @@
|
||||||
MODULE = libadsiid.a
|
STATICLIB = libadsiid.a
|
||||||
|
|
||||||
C_SRCS = \
|
C_SRCS = \
|
||||||
adsiid.c
|
adsiid.c
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
MODULE = libdmoguids.a
|
STATICLIB = libdmoguids.a
|
||||||
|
|
||||||
C_SRCS = \
|
C_SRCS = \
|
||||||
dmoguids.c
|
dmoguids.c
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
MODULE = libdxerr8.a
|
STATICLIB = libdxerr8.a
|
||||||
|
|
||||||
C_SRCS = \
|
C_SRCS = \
|
||||||
dxerr8.c
|
dxerr8.c
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
MODULE = libdxerr9.a
|
STATICLIB = libdxerr9.a
|
||||||
|
|
||||||
C_SRCS = \
|
C_SRCS = \
|
||||||
dxerr9.c
|
dxerr9.c
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
MODULE = libdxguid.a
|
STATICLIB = libdxguid.a
|
||||||
|
|
||||||
C_SRCS = \
|
C_SRCS = \
|
||||||
dx10guid.c \
|
dx10guid.c \
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
MODULE = libmfuuid.a
|
STATICLIB = libmfuuid.a
|
||||||
|
|
||||||
C_SRCS = \
|
C_SRCS = \
|
||||||
mfplay.c \
|
mfplay.c \
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
MODULE = libstrmbase.a
|
STATICLIB = libstrmbase.a
|
||||||
|
|
||||||
C_SRCS = \
|
C_SRCS = \
|
||||||
dispatch.c \
|
dispatch.c \
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
MODULE = libstrmiids.a
|
STATICLIB = libstrmiids.a
|
||||||
|
|
||||||
C_SRCS = \
|
C_SRCS = \
|
||||||
evr.c \
|
evr.c \
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
MODULE = libuuid.a
|
STATICLIB = libuuid.a
|
||||||
|
|
||||||
C_SRCS = \
|
C_SRCS = \
|
||||||
d2d.c \
|
d2d.c \
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
MODULE = libwbemuuid.a
|
STATICLIB = libwbemuuid.a
|
||||||
|
|
||||||
C_SRCS = \
|
C_SRCS = \
|
||||||
wbemuuid.c
|
wbemuuid.c
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
MODULE = libwinecrt0.a
|
STATICLIB = libwinecrt0.a
|
||||||
|
|
||||||
C_SRCS = \
|
C_SRCS = \
|
||||||
crt_dllmain.c \
|
crt_dllmain.c \
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
MODULE = libwmcodecdspuuid.a
|
STATICLIB = libwmcodecdspuuid.a
|
||||||
|
|
||||||
C_SRCS = \
|
C_SRCS = \
|
||||||
wmcodecdspuuid.c
|
wmcodecdspuuid.c
|
||||||
|
|
|
@ -229,7 +229,7 @@ sub parse_makefile($)
|
||||||
{
|
{
|
||||||
die "Configure substitution is not allowed in $file" unless $file eq "Makefile";
|
die "Configure substitution is not allowed in $file" unless $file eq "Makefile";
|
||||||
}
|
}
|
||||||
if (/^\s*(MODULE|IMPORTLIB|TESTDLL|PARENTSRC|APPMODE|EXTRADLLFLAGS)\s*=\s*(.*)/)
|
if (/^\s*(MODULE|IMPORTLIB|TESTDLL|STATICLIB|PARENTSRC|EXTRADLLFLAGS)\s*=\s*(.*)/)
|
||||||
{
|
{
|
||||||
my $var = $1;
|
my $var = $1;
|
||||||
$make{$var} = $2;
|
$make{$var} = $2;
|
||||||
|
@ -433,17 +433,16 @@ sub update_makefiles(@)
|
||||||
die "MODULE should not be defined in $file" if defined $make{"MODULE"};
|
die "MODULE should not be defined in $file" if defined $make{"MODULE"};
|
||||||
die "STATICLIB should not be defined in $file" if defined $make{"STATICLIB"};
|
die "STATICLIB should not be defined in $file" if defined $make{"STATICLIB"};
|
||||||
}
|
}
|
||||||
elsif (defined($make{"MODULE"}) && $make{"MODULE"} =~ /\.a$/) # import lib
|
elsif (defined($make{"STATICLIB"}))
|
||||||
{
|
{
|
||||||
die "MODULE should not be defined as static lib in $file" unless $file =~ /^dlls\//;
|
die "MODULE should not be defined in $file" if defined $make{"MODULE"};
|
||||||
die "APPMODE should not be defined in $file" if defined $make{"APPMODE"};
|
die "invalid STATICLIB name" unless $make{"STATICLIB"} =~ /\.a$/;
|
||||||
die "STATICLIB should not be defined in $file" if defined $make{"STATICLIB"};
|
|
||||||
}
|
}
|
||||||
elsif (defined($make{"MODULE"})) # dll or program
|
elsif (defined($make{"MODULE"})) # dll or program
|
||||||
{
|
{
|
||||||
(my $name = $file) =~ s/^(dlls|programs)\/(.*)\/Makefile/$2/;
|
(my $name = $file) =~ s/^(dlls|programs)\/(.*)\/Makefile/$2/;
|
||||||
my $dllflags = $make{"EXTRADLLFLAGS"} || "";
|
my $dllflags = $make{"EXTRADLLFLAGS"} || "";
|
||||||
if (defined $make{"APPMODE"}) { $dllflags .= " " . $make{"APPMODE"}; }
|
die "invalid MODULE name" if $make{"MODULE"} =~ /\.a$/;
|
||||||
die "MODULE should not be defined in $file" unless $file =~ /^(dlls|programs)\//;
|
die "MODULE should not be defined in $file" unless $file =~ /^(dlls|programs)\//;
|
||||||
die "STATICLIB should not be defined in $file" if defined $make{"STATICLIB"};
|
die "STATICLIB should not be defined in $file" if defined $make{"STATICLIB"};
|
||||||
if ($file =~ /^programs\//)
|
if ($file =~ /^programs\//)
|
||||||
|
@ -454,7 +453,6 @@ sub update_makefiles(@)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
die "APPMODE should not be defined in $file" if defined $make{"APPMODE"} ;
|
|
||||||
die "EXTRADLLFLAGS should not contain -mconsole or -mwindows in $file" if $dllflags =~ /-m(console|windows)/;
|
die "EXTRADLLFLAGS should not contain -mconsole or -mwindows in $file" if $dllflags =~ /-m(console|windows)/;
|
||||||
die "Invalid MODULE in $file" unless ($name =~ /\./ && $make{"MODULE"} eq $name) || $make{"MODULE"} eq "$name.dll";
|
die "Invalid MODULE in $file" unless ($name =~ /\./ && $make{"MODULE"} eq $name) || $make{"MODULE"} eq "$name.dll";
|
||||||
}
|
}
|
||||||
|
@ -467,9 +465,9 @@ sub update_makefiles(@)
|
||||||
}
|
}
|
||||||
elsif ($file =~ /^tools.*\/Makefile$/)
|
elsif ($file =~ /^tools.*\/Makefile$/)
|
||||||
{
|
{
|
||||||
die "APPMODE should not be defined in $file" if defined $make{"APPMODE"};
|
die "MODULE should not be defined in $file" if defined $make{"MODULE"};
|
||||||
die "EXTRADLLFLAGS should not be defined in $file" if defined $make{"EXTRADLLFLAGS"};
|
|
||||||
die "STATICLIB should not be defined in $file" if defined $make{"STATICLIB"};
|
die "STATICLIB should not be defined in $file" if defined $make{"STATICLIB"};
|
||||||
|
die "EXTRADLLFLAGS should not be defined in $file" if defined $make{"EXTRADLLFLAGS"};
|
||||||
$args = ",,[test \"x\$enable_tools\" = xno]";
|
$args = ",,[test \"x\$enable_tools\" = xno]";
|
||||||
}
|
}
|
||||||
push @lines, "WINE_CONFIG_MAKEFILE($dir$args)\n";
|
push @lines, "WINE_CONFIG_MAKEFILE($dir$args)\n";
|
||||||
|
|
|
@ -2965,12 +2965,12 @@ static void output_source_default( struct makefile *make, struct incl_file *sour
|
||||||
find_src_file( make, replace_extension( source->name, ".c", ".spec" )));
|
find_src_file( make, replace_extension( source->name, ".c", ".spec" )));
|
||||||
int need_cross = (crosstarget &&
|
int need_cross = (crosstarget &&
|
||||||
!(source->file->flags & FLAG_C_UNIX) &&
|
!(source->file->flags & FLAG_C_UNIX) &&
|
||||||
(make->is_cross || (make->module && make->staticlib) ||
|
(make->is_cross || make->staticlib ||
|
||||||
(source->file->flags & FLAG_C_IMPLIB)));
|
(source->file->flags & FLAG_C_IMPLIB)));
|
||||||
int need_obj = ((*dll_ext || !(source->file->flags & FLAG_C_UNIX)) &&
|
int need_obj = ((*dll_ext || !(source->file->flags & FLAG_C_UNIX)) &&
|
||||||
(!need_cross ||
|
(!need_cross ||
|
||||||
(source->file->flags & FLAG_C_IMPLIB) ||
|
(source->file->flags & FLAG_C_IMPLIB) ||
|
||||||
(make->module && make->staticlib)));
|
make->staticlib));
|
||||||
|
|
||||||
if ((source->file->flags & FLAG_GENERATED) &&
|
if ((source->file->flags & FLAG_GENERATED) &&
|
||||||
(!make->testdll || !strendswith( source->filename, "testlist.c" )))
|
(!make->testdll || !strendswith( source->filename, "testlist.c" )))
|
||||||
|
@ -2988,11 +2988,11 @@ static void output_source_default( struct makefile *make, struct incl_file *sour
|
||||||
output( "%s.o: %s\n", obj_dir_path( make, obj ), source->filename );
|
output( "%s.o: %s\n", obj_dir_path( make, obj ), source->filename );
|
||||||
output( "\t%s$(CC) -c -o $@ %s", cmd_prefix( "CC" ), source->filename );
|
output( "\t%s$(CC) -c -o $@ %s", cmd_prefix( "CC" ), source->filename );
|
||||||
output_filenames( defines );
|
output_filenames( defines );
|
||||||
if (make->sharedlib || (make->staticlib && !make->module) || (source->file->flags & FLAG_C_UNIX))
|
if (make->sharedlib || (source->file->flags & FLAG_C_UNIX))
|
||||||
{
|
{
|
||||||
output_filenames( unix_dllflags );
|
output_filenames( unix_dllflags );
|
||||||
}
|
}
|
||||||
else if (make->module || make->staticlib || make->testdll)
|
else if (make->module || make->testdll)
|
||||||
{
|
{
|
||||||
output_filenames( dll_flags );
|
output_filenames( dll_flags );
|
||||||
if (source->use_msvcrt) output_filenames( msvcrt_flags );
|
if (source->use_msvcrt) output_filenames( msvcrt_flags );
|
||||||
|
@ -4084,7 +4084,7 @@ static void load_sources( struct makefile *make )
|
||||||
make->install_dev = get_expanded_make_var_array( make, "INSTALL_DEV" );
|
make->install_dev = get_expanded_make_var_array( make, "INSTALL_DEV" );
|
||||||
make->extra_targets = get_expanded_make_var_array( make, "EXTRA_TARGETS" );
|
make->extra_targets = get_expanded_make_var_array( make, "EXTRA_TARGETS" );
|
||||||
|
|
||||||
if (make->module && strendswith( make->module, ".a" )) make->staticlib = make->module;
|
if (make->staticlib) make->module = make->staticlib;
|
||||||
|
|
||||||
make->disabled = make->obj_dir && strarray_exists( &disabled_dirs, make->obj_dir );
|
make->disabled = make->obj_dir && strarray_exists( &disabled_dirs, make->obj_dir );
|
||||||
make->is_win16 = strarray_exists( &make->extradllflags, "-m16" );
|
make->is_win16 = strarray_exists( &make->extradllflags, "-m16" );
|
||||||
|
|
Loading…
Reference in New Issue