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) ...@@ -12,23 +12,23 @@ INSTALLDIRS = $(DESTDIR)$(dlldir)
@MAKE_RULES@ @MAKE_RULES@
all: $(MODULE) all: $(MODULE:%=lib%.a)
# Rules for .a library # Rules for .a library
$(MODULE): $(OBJS) Makefile.in $(MODULE:%=lib%.a): $(OBJS) Makefile.in
$(RM) $@ $(RM) $@
$(AR) $(ARFLAGS) $@ $(OBJS) $(AR) $(ARFLAGS) $@ $(OBJS)
$(RANLIB) $@ $(RANLIB) $@
# Rules for installation # Rules for installation
install install-dev:: $(MODULE) $(DESTDIR)$(dlldir) install install-dev:: $(MODULE:%=lib%.a) $(DESTDIR)$(dlldir)
$(INSTALL_DATA) $(MODULE) $(DESTDIR)$(dlldir)/$(MODULE) $(INSTALL_DATA) $(MODULE:%=lib%.a) $(DESTDIR)$(dlldir)/$(MODULE:%=lib%.a)
install-lib:: install-lib::
uninstall:: uninstall::
$(RM) $(DESTDIR)$(dlldir)/$(MODULE) $(RM) $(DESTDIR)$(dlldir)/$(MODULE:%=lib%.a)
# End of global library rules # End of global library rules
...@@ -2,7 +2,7 @@ TOPSRCDIR = @top_srcdir@ ...@@ -2,7 +2,7 @@ TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../.. TOPOBJDIR = ../..
SRCDIR = @srcdir@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
MODULE = libadsiid.a MODULE = adsiid
C_SRCS = \ C_SRCS = \
adsiid.c adsiid.c
......
...@@ -2,7 +2,7 @@ TOPSRCDIR = @top_srcdir@ ...@@ -2,7 +2,7 @@ TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../.. TOPOBJDIR = ../..
SRCDIR = @srcdir@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
MODULE = libdxerr8.a MODULE = dxerr8
C_SRCS = \ C_SRCS = \
dxerr8.c dxerr8.c
......
...@@ -2,7 +2,7 @@ TOPSRCDIR = @top_srcdir@ ...@@ -2,7 +2,7 @@ TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../.. TOPOBJDIR = ../..
SRCDIR = @srcdir@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
MODULE = libdxerr9.a MODULE = dxerr9
C_SRCS = \ C_SRCS = \
dxerr9.c dxerr9.c
......
...@@ -2,7 +2,7 @@ TOPSRCDIR = @top_srcdir@ ...@@ -2,7 +2,7 @@ TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../.. TOPOBJDIR = ../..
SRCDIR = @srcdir@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
MODULE = libdxguid.a MODULE = dxguid
C_SRCS = \ C_SRCS = \
dx8guid.c \ dx8guid.c \
......
...@@ -2,7 +2,7 @@ TOPSRCDIR = @top_srcdir@ ...@@ -2,7 +2,7 @@ TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../.. TOPOBJDIR = ../..
SRCDIR = @srcdir@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
MODULE = libstrmiids.a MODULE = strmiids
C_SRCS = \ C_SRCS = \
strmiids.c strmiids.c
......
...@@ -2,7 +2,7 @@ TOPSRCDIR = @top_srcdir@ ...@@ -2,7 +2,7 @@ TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../.. TOPOBJDIR = ../..
SRCDIR = @srcdir@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
MODULE = libuuid.a MODULE = uuid
C_SRCS = \ C_SRCS = \
uuid.c uuid.c
......
...@@ -2,7 +2,7 @@ TOPSRCDIR = @top_srcdir@ ...@@ -2,7 +2,7 @@ TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../.. TOPOBJDIR = ../..
SRCDIR = @srcdir@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
MODULE = libwinecrt0.a MODULE = winecrt0
C_SRCS = \ C_SRCS = \
delay_load.c \ delay_load.c \
......
...@@ -390,10 +390,10 @@ sub update_dlls(@) ...@@ -390,10 +390,10 @@ sub update_dlls(@)
my $module = $makefile{"MODULE"}; my $module = $makefile{"MODULE"};
(my $dir = $makefile{"=dir"}) =~ s/^dlls\/(.*)\//$1/; (my $dir = $makefile{"=dir"}) =~ s/^dlls\/(.*)\//$1/;
if ($module =~ /^lib.*\.a$/) if ($makefile{"=rules"} eq $makerules{"MAKE_IMPLIB_RULES"})
{ {
$staticlib_dirs{$module} = $dir; $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 else
{ {
...@@ -522,7 +522,7 @@ sub update_dlls(@) ...@@ -522,7 +522,7 @@ sub update_dlls(@)
$text .= "\n\nIMPORT_LIBS = \\\n\t\$(IMPORT_SYMLINKS)"; $text .= "\n\nIMPORT_LIBS = \\\n\t\$(IMPORT_SYMLINKS)";
foreach my $mod (sort keys %staticlib_dirs) 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) foreach my $mod (sort keys %importlibs)
{ {
...@@ -563,7 +563,7 @@ sub update_dlls(@) ...@@ -563,7 +563,7 @@ sub update_dlls(@)
foreach my $mod (sort keys %staticlib_dirs) 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"; $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