From 4500836635aa9264881b41d33bc6313fd8a95632 Mon Sep 17 00:00:00 2001 From: Rob Shearman Date: Mon, 10 Mar 2008 16:35:33 +0000 Subject: [PATCH] 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. --- dlls/Makeimplib.rules.in | 10 +++++----- dlls/adsiid/Makefile.in | 2 +- dlls/dxerr8/Makefile.in | 2 +- dlls/dxerr9/Makefile.in | 2 +- dlls/dxguid/Makefile.in | 2 +- dlls/strmiids/Makefile.in | 2 +- dlls/uuid/Makefile.in | 2 +- dlls/winecrt0/Makefile.in | 2 +- tools/make_makefiles | 8 ++++---- 9 files changed, 16 insertions(+), 16 deletions(-) diff --git a/dlls/Makeimplib.rules.in b/dlls/Makeimplib.rules.in index 88814fc5f27..b21d59aca45 100644 --- a/dlls/Makeimplib.rules.in +++ b/dlls/Makeimplib.rules.in @@ -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 diff --git a/dlls/adsiid/Makefile.in b/dlls/adsiid/Makefile.in index 099b811c478..69e5a08669f 100644 --- a/dlls/adsiid/Makefile.in +++ b/dlls/adsiid/Makefile.in @@ -2,7 +2,7 @@ TOPSRCDIR = @top_srcdir@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ VPATH = @srcdir@ -MODULE = libadsiid.a +MODULE = adsiid C_SRCS = \ adsiid.c diff --git a/dlls/dxerr8/Makefile.in b/dlls/dxerr8/Makefile.in index 54cb98254b9..c5e6d525792 100644 --- a/dlls/dxerr8/Makefile.in +++ b/dlls/dxerr8/Makefile.in @@ -2,7 +2,7 @@ TOPSRCDIR = @top_srcdir@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ VPATH = @srcdir@ -MODULE = libdxerr8.a +MODULE = dxerr8 C_SRCS = \ dxerr8.c diff --git a/dlls/dxerr9/Makefile.in b/dlls/dxerr9/Makefile.in index eb4e1149d34..460ff7f04a7 100644 --- a/dlls/dxerr9/Makefile.in +++ b/dlls/dxerr9/Makefile.in @@ -2,7 +2,7 @@ TOPSRCDIR = @top_srcdir@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ VPATH = @srcdir@ -MODULE = libdxerr9.a +MODULE = dxerr9 C_SRCS = \ dxerr9.c diff --git a/dlls/dxguid/Makefile.in b/dlls/dxguid/Makefile.in index dc733ea84a0..8659ba1e4fa 100644 --- a/dlls/dxguid/Makefile.in +++ b/dlls/dxguid/Makefile.in @@ -2,7 +2,7 @@ TOPSRCDIR = @top_srcdir@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ VPATH = @srcdir@ -MODULE = libdxguid.a +MODULE = dxguid C_SRCS = \ dx8guid.c \ diff --git a/dlls/strmiids/Makefile.in b/dlls/strmiids/Makefile.in index c6dc7d8f207..fb9d996709d 100644 --- a/dlls/strmiids/Makefile.in +++ b/dlls/strmiids/Makefile.in @@ -2,7 +2,7 @@ TOPSRCDIR = @top_srcdir@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ VPATH = @srcdir@ -MODULE = libstrmiids.a +MODULE = strmiids C_SRCS = \ strmiids.c diff --git a/dlls/uuid/Makefile.in b/dlls/uuid/Makefile.in index a0de5f3ed6a..7bd993cf351 100644 --- a/dlls/uuid/Makefile.in +++ b/dlls/uuid/Makefile.in @@ -2,7 +2,7 @@ TOPSRCDIR = @top_srcdir@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ VPATH = @srcdir@ -MODULE = libuuid.a +MODULE = uuid C_SRCS = \ uuid.c diff --git a/dlls/winecrt0/Makefile.in b/dlls/winecrt0/Makefile.in index 571291c4399..e135f9d2113 100644 --- a/dlls/winecrt0/Makefile.in +++ b/dlls/winecrt0/Makefile.in @@ -2,7 +2,7 @@ TOPSRCDIR = @top_srcdir@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ VPATH = @srcdir@ -MODULE = libwinecrt0.a +MODULE = winecrt0 C_SRCS = \ delay_load.c \ diff --git a/tools/make_makefiles b/tools/make_makefiles index edcade72de9..041875f02e8 100755 --- a/tools/make_makefiles +++ b/tools/make_makefiles @@ -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";