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.
This commit is contained in:
Rob Shearman 2008-03-10 16:35:33 +00:00 committed by Alexandre Julliard
parent 088ae3b81c
commit 4500836635
9 changed files with 16 additions and 16 deletions

View File

@ -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

View File

@ -2,7 +2,7 @@ TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = libadsiid.a
MODULE = adsiid
C_SRCS = \
adsiid.c

View File

@ -2,7 +2,7 @@ TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = libdxerr8.a
MODULE = dxerr8
C_SRCS = \
dxerr8.c

View File

@ -2,7 +2,7 @@ TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = libdxerr9.a
MODULE = dxerr9
C_SRCS = \
dxerr9.c

View File

@ -2,7 +2,7 @@ TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = libdxguid.a
MODULE = dxguid
C_SRCS = \
dx8guid.c \

View File

@ -2,7 +2,7 @@ TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = libstrmiids.a
MODULE = strmiids
C_SRCS = \
strmiids.c

View File

@ -2,7 +2,7 @@ TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = libuuid.a
MODULE = uuid
C_SRCS = \
uuid.c

View File

@ -2,7 +2,7 @@ TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = libwinecrt0.a
MODULE = winecrt0
C_SRCS = \
delay_load.c \

View File

@ -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";