makefiles: Generate the static library rules from configure.

This commit is contained in:
Alexandre Julliard 2010-01-26 20:40:12 +01:00
parent 356b06faea
commit b6c275b1b4
5 changed files with 65 additions and 69 deletions

8
aclocal.m4 vendored
View File

@ -215,7 +215,13 @@ dnl
dnl Usage: WINE_CONFIG_LIB(name)
dnl
AC_DEFUN([WINE_CONFIG_LIB],
[WINE_CONFIG_MAKEFILE([dlls/$1/Makefile],[dlls/Makeimplib.rules],[dlls],[ALL_IMPLIB_DIRS])])
[ALL_STATIC_LIBS="$ALL_STATIC_LIBS \\
$1/lib$1.a"
ALL_IMPORTLIB_RULES="$ALL_IMPORTLIB_RULES
$1/lib$1.a: $1
$1/lib$1.cross.a: dummy
@cd $1 && \$(MAKE) lib$1.cross.a"
WINE_CONFIG_MAKEFILE([dlls/$1/Makefile],[dlls/Makeimplib.rules],[dlls],[ALL_IMPLIB_DIRS])])
dnl **** Add a message to the list displayed at the end ****
dnl

48
configure vendored
View File

@ -601,6 +601,8 @@ ALL_PROGRAM_BIN_INSTALL_DIRS
ALL_PROGRAM_INSTALL_DIRS
ALL_PROGRAM_DIRS
ALL_TEST_DIRS
ALL_IMPORTLIB_RULES
ALL_STATIC_LIBS
ALL_IMPLIB_DIRS
ALL_DLL_DIRS
ALL_TOP_DIRS
@ -13604,6 +13606,10 @@ ALL_DLL_DIRS=""
ALL_IMPLIB_DIRS=""
ALL_STATIC_LIBS=""
ALL_IMPORTLIB_RULES=""
ALL_TEST_DIRS=""
ALL_PROGRAM_DIRS=""
@ -13713,6 +13719,12 @@ ALL_MAKEFILE_DEPENDS="$ALL_MAKEFILE_DEPENDS
dlls/actxprxy/Makefile: dlls/actxprxy/Makefile.in dlls/Makedll.rules"
ac_config_files="$ac_config_files dlls/actxprxy/Makefile"
ALL_STATIC_LIBS="$ALL_STATIC_LIBS \\
adsiid/libadsiid.a"
ALL_IMPORTLIB_RULES="$ALL_IMPORTLIB_RULES
adsiid/libadsiid.a: adsiid
adsiid/libadsiid.cross.a: dummy
@cd adsiid && \$(MAKE) libadsiid.cross.a"
ALL_MAKEFILES="$ALL_MAKEFILES \\
dlls/adsiid/Makefile"
test "x$enable_adsiid" != xno && ALL_IMPLIB_DIRS="$ALL_IMPLIB_DIRS \\
@ -14697,6 +14709,12 @@ ALL_MAKEFILE_DEPENDS="$ALL_MAKEFILE_DEPENDS
dlls/dxdiagn/tests/Makefile: dlls/dxdiagn/tests/Makefile.in dlls/Maketest.rules"
ac_config_files="$ac_config_files dlls/dxdiagn/tests/Makefile"
ALL_STATIC_LIBS="$ALL_STATIC_LIBS \\
dxerr8/libdxerr8.a"
ALL_IMPORTLIB_RULES="$ALL_IMPORTLIB_RULES
dxerr8/libdxerr8.a: dxerr8
dxerr8/libdxerr8.cross.a: dummy
@cd dxerr8 && \$(MAKE) libdxerr8.cross.a"
ALL_MAKEFILES="$ALL_MAKEFILES \\
dlls/dxerr8/Makefile"
test "x$enable_dxerr8" != xno && ALL_IMPLIB_DIRS="$ALL_IMPLIB_DIRS \\
@ -14705,6 +14723,12 @@ ALL_MAKEFILE_DEPENDS="$ALL_MAKEFILE_DEPENDS
dlls/dxerr8/Makefile: dlls/dxerr8/Makefile.in dlls/Makeimplib.rules"
ac_config_files="$ac_config_files dlls/dxerr8/Makefile"
ALL_STATIC_LIBS="$ALL_STATIC_LIBS \\
dxerr9/libdxerr9.a"
ALL_IMPORTLIB_RULES="$ALL_IMPORTLIB_RULES
dxerr9/libdxerr9.a: dxerr9
dxerr9/libdxerr9.cross.a: dummy
@cd dxerr9 && \$(MAKE) libdxerr9.cross.a"
ALL_MAKEFILES="$ALL_MAKEFILES \\
dlls/dxerr9/Makefile"
test "x$enable_dxerr9" != xno && ALL_IMPLIB_DIRS="$ALL_IMPLIB_DIRS \\
@ -14729,6 +14753,12 @@ ALL_MAKEFILE_DEPENDS="$ALL_MAKEFILE_DEPENDS
dlls/dxgi/tests/Makefile: dlls/dxgi/tests/Makefile.in dlls/Maketest.rules"
ac_config_files="$ac_config_files dlls/dxgi/tests/Makefile"
ALL_STATIC_LIBS="$ALL_STATIC_LIBS \\
dxguid/libdxguid.a"
ALL_IMPORTLIB_RULES="$ALL_IMPORTLIB_RULES
dxguid/libdxguid.a: dxguid
dxguid/libdxguid.cross.a: dummy
@cd dxguid && \$(MAKE) libdxguid.cross.a"
ALL_MAKEFILES="$ALL_MAKEFILES \\
dlls/dxguid/Makefile"
test "x$enable_dxguid" != xno && ALL_IMPLIB_DIRS="$ALL_IMPLIB_DIRS \\
@ -16601,6 +16631,12 @@ ALL_MAKEFILE_DEPENDS="$ALL_MAKEFILE_DEPENDS
dlls/stress.dll16/Makefile: dlls/stress.dll16/Makefile.in dlls/Makedll.rules"
ac_config_files="$ac_config_files dlls/stress.dll16/Makefile"
ALL_STATIC_LIBS="$ALL_STATIC_LIBS \\
strmiids/libstrmiids.a"
ALL_IMPORTLIB_RULES="$ALL_IMPORTLIB_RULES
strmiids/libstrmiids.a: strmiids
strmiids/libstrmiids.cross.a: dummy
@cd strmiids && \$(MAKE) libstrmiids.cross.a"
ALL_MAKEFILES="$ALL_MAKEFILES \\
dlls/strmiids/Makefile"
test "x$enable_strmiids" != xno && ALL_IMPLIB_DIRS="$ALL_IMPLIB_DIRS \\
@ -16793,6 +16829,12 @@ ALL_MAKEFILE_DEPENDS="$ALL_MAKEFILE_DEPENDS
dlls/usp10/tests/Makefile: dlls/usp10/tests/Makefile.in dlls/Maketest.rules"
ac_config_files="$ac_config_files dlls/usp10/tests/Makefile"
ALL_STATIC_LIBS="$ALL_STATIC_LIBS \\
uuid/libuuid.a"
ALL_IMPORTLIB_RULES="$ALL_IMPORTLIB_RULES
uuid/libuuid.a: uuid
uuid/libuuid.cross.a: dummy
@cd uuid && \$(MAKE) libuuid.cross.a"
ALL_MAKEFILES="$ALL_MAKEFILES \\
dlls/uuid/Makefile"
test "x$enable_uuid" != xno && ALL_IMPLIB_DIRS="$ALL_IMPLIB_DIRS \\
@ -17001,6 +17043,12 @@ ALL_MAKEFILE_DEPENDS="$ALL_MAKEFILE_DEPENDS
dlls/winecoreaudio.drv/Makefile: dlls/winecoreaudio.drv/Makefile.in dlls/Makedll.rules"
ac_config_files="$ac_config_files dlls/winecoreaudio.drv/Makefile"
ALL_STATIC_LIBS="$ALL_STATIC_LIBS \\
winecrt0/libwinecrt0.a"
ALL_IMPORTLIB_RULES="$ALL_IMPORTLIB_RULES
winecrt0/libwinecrt0.a: winecrt0
winecrt0/libwinecrt0.cross.a: dummy
@cd winecrt0 && \$(MAKE) libwinecrt0.cross.a"
ALL_MAKEFILES="$ALL_MAKEFILES \\
dlls/winecrt0/Makefile"
test "x$enable_winecrt0" != xno && ALL_IMPLIB_DIRS="$ALL_IMPLIB_DIRS \\

View File

@ -2091,6 +2091,8 @@ AC_SUBST(ALL_MAKEFILE_DEPENDS,["# Makefile dependencies"])
AC_SUBST(ALL_TOP_DIRS,"")
AC_SUBST(ALL_DLL_DIRS,"")
AC_SUBST(ALL_IMPLIB_DIRS,"")
AC_SUBST(ALL_STATIC_LIBS,"")
AC_SUBST(ALL_IMPORTLIB_RULES,"")
AC_SUBST(ALL_TEST_DIRS,"")
AC_SUBST(ALL_PROGRAM_DIRS,"")
AC_SUBST(ALL_PROGRAM_INSTALL_DIRS,"")

View File

@ -31,15 +31,9 @@ IMPORT_SYMLINKS = \
libwinspool.$(IMPLIBEXT) \
libxinput.$(IMPLIBEXT)
IMPORT_LIBS = \
STATIC_LIBS = @ALL_STATIC_LIBS@
IMPORT_LIBS = $(STATIC_LIBS) \
$(IMPORT_SYMLINKS) \
adsiid/libadsiid.a \
dxerr8/libdxerr8.a \
dxerr9/libdxerr9.a \
dxguid/libdxguid.a \
strmiids/libstrmiids.a \
uuid/libuuid.a \
winecrt0/libwinecrt0.a \
aclui/libaclui.$(IMPLIBEXT) \
activeds/libactiveds.$(IMPLIBEXT) \
advapi32/libadvapi32.$(IMPLIBEXT) \
@ -184,17 +178,10 @@ IMPORT_LIBS = \
wtsapi32/libwtsapi32.$(IMPLIBEXT) \
xinput1_3/libxinput.$(IMPLIBEXT)
CROSS_IMPLIBS = \
CROSS_IMPLIBS = $(STATIC_LIBS:.a=.cross.a) \
libd3dx9.cross.a \
libwinspool.cross.a \
libxinput.cross.a \
adsiid/libadsiid.cross.a \
dxerr8/libdxerr8.cross.a \
dxerr9/libdxerr9.cross.a \
dxguid/libdxguid.cross.a \
strmiids/libstrmiids.cross.a \
uuid/libuuid.cross.a \
winecrt0/libwinecrt0.cross.a \
aclui/libaclui.cross.a \
activeds/libactiveds.cross.a \
advapi32/libadvapi32.cross.a \
@ -812,36 +799,7 @@ libxinput.def: xinput1_3/libxinput.def
$(BUILDSUBDIRS): $(IMPORT_LIBS)
$(INSTALLSUBDIRS:%=%/__install__) $(INSTALLSUBDIRS:%=%/__install-lib__): $(IMPORT_LIBS)
# Map library name to the corresponding directory
adsiid/libadsiid.a: adsiid
adsiid/libadsiid.cross.a: dummy
@cd adsiid && $(MAKE) libadsiid.cross.a
dxerr8/libdxerr8.a: dxerr8
dxerr8/libdxerr8.cross.a: dummy
@cd dxerr8 && $(MAKE) libdxerr8.cross.a
dxerr9/libdxerr9.a: dxerr9
dxerr9/libdxerr9.cross.a: dummy
@cd dxerr9 && $(MAKE) libdxerr9.cross.a
dxguid/libdxguid.a: dxguid
dxguid/libdxguid.cross.a: dummy
@cd dxguid && $(MAKE) libdxguid.cross.a
strmiids/libstrmiids.a: strmiids
strmiids/libstrmiids.cross.a: dummy
@cd strmiids && $(MAKE) libstrmiids.cross.a
uuid/libuuid.a: uuid
uuid/libuuid.cross.a: dummy
@cd uuid && $(MAKE) libuuid.cross.a
winecrt0/libwinecrt0.a: winecrt0
winecrt0/libwinecrt0.cross.a: dummy
@cd winecrt0 && $(MAKE) libwinecrt0.cross.a
@ALL_IMPORTLIB_RULES@
# Misc rules

View File

@ -509,27 +509,20 @@ sub update_dlls(@)
$text .= sprintf " \\\n\tlib%s.\$(IMPLIBEXT)", $importlibs{$mod};
}
$text .= "\n\nIMPORT_LIBS = \\\n\t\$(IMPORT_SYMLINKS)";
foreach my $mod (sort keys %staticlib_dirs)
{
$text .= sprintf " \\\n\t%s/lib%s.a", $staticlib_dirs{$mod}, $mod;
}
$text .= "\n\nSTATIC_LIBS = \@ALL_STATIC_LIBS\@\n";
$text .= "IMPORT_LIBS = \$(STATIC_LIBS) \\\n\t\$(IMPORT_SYMLINKS)";
foreach my $mod (sort keys %importlibs)
{
$text .= " \\\n\t$directories{$mod}/lib$importlibs{$mod}.\$(IMPLIBEXT)";
next unless defined $static_implibs{$mod};
$text .= " \\\n\t$directories{$mod}/lib$importlibs{$mod}.\$(STATIC_IMPLIBEXT)";
}
$text .= "\n\nCROSS_IMPLIBS =";
$text .= "\n\nCROSS_IMPLIBS = \$(STATIC_LIBS:.a=.cross.a)";
foreach my $mod (sort @lib_symlinks)
{
next if $mod =~ /16$/;
$text .= sprintf " \\\n\tlib%s.cross.a", $importlibs{$mod};
}
foreach my $mod (sort keys %staticlib_dirs)
{
$text .= sprintf " \\\n\t%s/lib%s.cross.a", $staticlib_dirs{$mod}, $mod;
}
foreach my $mod (sort keys %importlibs)
{
next if $mod =~ /16$/;
@ -576,18 +569,7 @@ sub update_dlls(@)
$text .= "\$(BUILDSUBDIRS): \$(IMPORT_LIBS)\n";
$text .= "\$(INSTALLSUBDIRS:%=%/__install__) \$(INSTALLSUBDIRS:%=%/__install-lib__): \$(IMPORT_LIBS)\n\n";
# output the inter-dll dependencies and rules
$text .= "# Map library name to the corresponding directory\n\n";
foreach my $mod (sort keys %staticlib_dirs)
{
my $dir = $staticlib_dirs{$mod};
$text .= sprintf "%s/lib%s.a: %s\n", $staticlib_dirs{$mod}, $mod, $staticlib_dirs{$mod};
$text .= sprintf "%s/lib%s.cross.a: dummy\n", $dir, $mod;
$text .= sprintf "\t\@cd %s && \$(MAKE) lib%s.cross.a\n\n", $dir, $mod;
}
$text .= "\@ALL_IMPORTLIB_RULES\@\n";
$text .= "\n# Misc rules\n";
replace_in_file( "dlls/Makefile.in",