makefiles: Build the import libraries directly from the top-level makefile.

This commit is contained in:
Alexandre Julliard 2010-02-10 10:57:57 +01:00
parent 10e4edd9f4
commit 86ab297bea
5 changed files with 752 additions and 631 deletions

View File

@ -87,8 +87,9 @@ uninstall::
# Import libraries
STATIC_LIBS = @ALL_STATIC_LIBS@
IMPORT_LIBS = @ALL_IMPORT_LIBS@
implib: $(ALL_STATICLIB_DIRS)
implib: $(ALL_STATICLIB_DIRS) $(IMPORT_LIBS)
.PHONY: implib
# Dependencies between directories
@ -96,8 +97,8 @@ implib: $(ALL_STATICLIB_DIRS)
all: $(INSTALLSUBDIRS)
# dependencies needed to build any dll or program
__builddeps__: libs/port libs/wine libs/wpp $(ALL_TOOL_DIRS) include $(ALL_STATICLIB_DIRS)
__buildcrossdeps__: libs/port libs/wine $(ALL_TOOL_DIRS) include $(STATIC_LIBS:.a=.cross.a)
__builddeps__: libs/port libs/wine libs/wpp $(ALL_TOOL_DIRS) include $(ALL_STATICLIB_DIRS) $(IMPORT_LIBS)
__buildcrossdeps__: libs/port libs/wine $(ALL_TOOL_DIRS) include $(STATIC_LIBS:.a=.cross.a) $(IMPORT_LIBS:.def=.cross.a)
.PHONY: __builddeps__ __buildcrossdeps__
dlls programs: __builddeps__
@ -117,8 +118,6 @@ include/__install__ include/__install-dev__: include
libs/wine/__install__ libs/wine/__install-lib__ libs/wine/__install-dev__: libs/wine
loader/__install__ loader/__install-lib__: libs/port libs/wine tools
server/__install__ server/__install-lib__: libs/port libs/wine tools
programs/__install__: dlls/__install__
programs/__install-lib__: dlls/__install-lib__
tools/__install__ tools/__install-lib__ tools/__install-dev__: tools
tools/widl/__install__ tools/widl/__install-dev__: tools/widl
tools/winebuild/__install__ tools/winebuild/__install-dev__: tools/winebuild

29
aclocal.m4 vendored
View File

@ -187,26 +187,27 @@ dnl Usage: WINE_CONFIG_DLL(name,enable,implib,implibsrc)
dnl
AC_DEFUN([WINE_CONFIG_DLL],
[m4_ifval([$3],[m4_ifval([$2],[test "x$[$2]" = xno || ])ALL_IMPORT_LIBS="$ALL_IMPORT_LIBS \\
$1/lib$3.$IMPLIBEXT[]dnl
dlls/$1/lib$3.$IMPLIBEXT[]dnl
m4_if($1,$3,,[ \\
lib$3.$IMPLIBEXT])[]dnl
dlls/lib$3.$IMPLIBEXT])[]dnl
m4_ifval([$4],[ \\
$1/lib$3.$STATIC_IMPLIBEXT])"
ALL_IMPORTLIB_RULES="$ALL_IMPORTLIB_RULES
m4_if($1,$3,,[lib$3.a: $1/lib$3.a
dlls/$1/lib$3.$STATIC_IMPLIBEXT])"
ALL_MAKEFILE_DEPENDS="$ALL_MAKEFILE_DEPENDS
dlls/$1/lib$3.$IMPLIBEXT m4_ifval([$4],[dlls/$1/lib$3.$STATIC_IMPLIBEXT ])dlls/$1/lib$3.cross.a: tools/widl tools/winebuild tools/winegcc include
m4_if($1,$3,,[dlls/lib$3.a: dlls/$1/lib$3.a
\$(RM) \$[@] && \$(LN_S) $1/lib$3.a \$[@]
lib$3.cross.a: $1/lib$3.cross.a
dlls/lib$3.cross.a: dlls/$1/lib$3.cross.a
\$(RM) \$[@] && \$(LN_S) $1/lib$3.cross.a \$[@]
lib$3.def: $1/lib$3.def
dlls/lib$3.def: dlls/$1/lib$3.def
\$(RM) \$[@] && \$(LN_S) $1/lib$3.def \$[@]
clean::
\$(RM) lib$3.def
])m4_ifval([$4],[$1/lib$3.def: $1/$1.spec \$(WINEBUILD)
@cd $1 && \$(MAKE) \`basename \$[@]\`
$1/lib$3.$STATIC_IMPLIBEXT $1/lib$3.cross.a: dummy
@cd $1 && \$(MAKE) \`basename \$[@]\`],
[$1/lib$3.def $1/lib$3.a $1/lib$3.cross.a: $1/$1.spec \$(WINEBUILD)
@cd $1 && \$(MAKE) \`basename \$[@]\`])"
\$(RM) dlls/lib$3.def
])m4_ifval([$4],[dlls/$1/lib$3.def: dlls/$1/$1.spec dlls/$1/Makefile
@cd dlls/$1 && \$(MAKE) \`basename \$[@]\`
dlls/$1/lib$3.$STATIC_IMPLIBEXT dlls/$1/lib$3.cross.a: dlls/$1/Makefile dummy
@cd dlls/$1 && \$(MAKE) \`basename \$[@]\`],
[dlls/$1/lib$3.$IMPLIBEXT dlls/$1/lib$3.cross.a: dlls/$1/$1.spec dlls/$1/Makefile
@cd dlls/$1 && \$(MAKE) \`basename \$[@]\`])"
])dnl
WINE_CONFIG_MAKEFILE([dlls/$1/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS],[$2])])

1327
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -2106,7 +2106,6 @@ AC_SUBST(ALL_TOOL_DIRS,"")
AC_SUBST(ALL_STATICLIB_DIRS,"")
AC_SUBST(ALL_STATIC_LIBS,"")
AC_SUBST(ALL_IMPORT_LIBS,"")
AC_SUBST(ALL_IMPORTLIB_RULES,"")
AC_SUBST(ALL_TEST_DIRS,"")
AC_SUBST(ALL_TEST_BINARIES,"")
AC_SUBST(ALL_PROGRAM_DIRS,"")

View File

@ -18,23 +18,6 @@ DOCSUBDIRS = $(DLLSUBDIRS)
all: $(BUILDSUBDIRS)
# Import libraries
IMPORT_LIBS = @ALL_IMPORT_LIBS@
$(TESTSUBDIRS:%=%/__crosstest__): $(IMPORT_LIBS:.def=.cross.a)
implib: $(IMPORT_LIBS)
testsubdirs: $(TESTSUBDIRS)
.PHONY: implib testsubdirs
$(BUILDSUBDIRS): $(IMPORT_LIBS)
$(INSTALLSUBDIRS:%=%/__install__) $(INSTALLSUBDIRS:%=%/__install-lib__): $(IMPORT_LIBS)
@ALL_IMPORTLIB_RULES@
# Misc rules
uninstall::