Commit 45008366 authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

makefiles: Simplify the use of the MODULE variable in static import libraries.

Don't include platform-specific information when declaring the name of the static import libary to build. Instead, add this information in Makeimplib.rules.in.
parent 088ae3b8
......@@ -12,23 +12,23 @@ INSTALLDIRS = $(DESTDIR)$(dlldir)
@MAKE_RULES@
all: $(MODULE)
all: $(MODULE:%=lib%.a)
# Rules for .a library
$(MODULE): $(OBJS) Makefile.in
$(MODULE:%=lib%.a): $(OBJS) Makefile.in
$(RM) $@
$(AR) $(ARFLAGS) $@ $(OBJS)
$(RANLIB) $@
# Rules for installation
install install-dev:: $(MODULE) $(DESTDIR)$(dlldir)
$(INSTALL_DATA) $(MODULE) $(DESTDIR)$(dlldir)/$(MODULE)
install install-dev:: $(MODULE:%=lib%.a) $(DESTDIR)$(dlldir)
$(INSTALL_DATA) $(MODULE:%=lib%.a) $(DESTDIR)$(dlldir)/$(MODULE:%=lib%.a)
install-lib::
uninstall::
$(RM) $(DESTDIR)$(dlldir)/$(MODULE)
$(RM) $(DESTDIR)$(dlldir)/$(MODULE:%=lib%.a)
# End of global library rules
......@@ -2,7 +2,7 @@ TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = libadsiid.a
MODULE = adsiid
C_SRCS = \
adsiid.c
......
......@@ -2,7 +2,7 @@ TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = libdxerr8.a
MODULE = dxerr8
C_SRCS = \
dxerr8.c
......
......@@ -2,7 +2,7 @@ TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = libdxerr9.a
MODULE = dxerr9
C_SRCS = \
dxerr9.c
......
......@@ -2,7 +2,7 @@ TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = libdxguid.a
MODULE = dxguid
C_SRCS = \
dx8guid.c \
......
......@@ -2,7 +2,7 @@ TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = libstrmiids.a
MODULE = strmiids
C_SRCS = \
strmiids.c
......
......@@ -2,7 +2,7 @@ TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = libuuid.a
MODULE = uuid
C_SRCS = \
uuid.c
......
......@@ -2,7 +2,7 @@ TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = libwinecrt0.a
MODULE = winecrt0
C_SRCS = \
delay_load.c \
......
......@@ -390,10 +390,10 @@ sub update_dlls(@)
my $module = $makefile{"MODULE"};
(my $dir = $makefile{"=dir"}) =~ s/^dlls\/(.*)\//$1/;
if ($module =~ /^lib.*\.a$/)
if ($makefile{"=rules"} eq $makerules{"MAKE_IMPLIB_RULES"})
{
$staticlib_dirs{$module} = $dir;
die "invalid module $module in dir $staticlib_dirs{$module}\n" if "lib$staticlib_dirs{$module}.a" ne $module;
die "invalid module $module in dir $staticlib_dirs{$module}\n" if "$staticlib_dirs{$module}" ne $module;
}
else
{
......@@ -522,7 +522,7 @@ sub update_dlls(@)
$text .= "\n\nIMPORT_LIBS = \\\n\t\$(IMPORT_SYMLINKS)";
foreach my $mod (sort keys %staticlib_dirs)
{
$text .= sprintf " \\\n\t%s/%s", $staticlib_dirs{$mod}, $mod;
$text .= sprintf " \\\n\t%s/lib%s.a", $staticlib_dirs{$mod}, $mod;
}
foreach my $mod (sort keys %importlibs)
{
......@@ -563,7 +563,7 @@ sub update_dlls(@)
foreach my $mod (sort keys %staticlib_dirs)
{
$text .= sprintf "%s/%s: %s\n", $staticlib_dirs{$mod}, $mod, $staticlib_dirs{$mod};
$text .= sprintf "%s/lib%s.a: %s\n", $staticlib_dirs{$mod}, $mod, $staticlib_dirs{$mod};
}
$text .= "\n# Misc rules\n";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment