Use import libraries when building tests too. Make sure the .a

libraries are built for crosstest.
This commit is contained in:
Alexandre Julliard 2002-12-15 01:20:54 +00:00
parent f9875bc1ca
commit f1b4819ed2
3 changed files with 95 additions and 94 deletions

View File

@ -166,7 +166,6 @@ WIN16_FILES = \
win87em.dll$(DLLEXT) \ win87em.dll$(DLLEXT) \
winaspi.dll$(DLLEXT) \ winaspi.dll$(DLLEXT) \
windebug.dll$(DLLEXT) \ windebug.dll$(DLLEXT) \
winedos16.dll$(DLLEXT) \
wineps16.dll$(DLLEXT) \ wineps16.dll$(DLLEXT) \
wing.dll$(DLLEXT) \ wing.dll$(DLLEXT) \
winnls.dll$(DLLEXT) \ winnls.dll$(DLLEXT) \
@ -524,7 +523,7 @@ winearts.drv$(DLLEXT): winmm/winearts/winearts.drv$(DLLEXT)
wineaudioio.drv$(DLLEXT): winmm/wineaudioio/wineaudioio.drv$(DLLEXT) wineaudioio.drv$(DLLEXT): winmm/wineaudioio/wineaudioio.drv$(DLLEXT)
$(RM) $@ && $(LN_S) winmm/wineaudioio/wineaudioio.drv$(DLLEXT) $@ $(RM) $@ && $(LN_S) winmm/wineaudioio/wineaudioio.drv$(DLLEXT) $@
winedos.dll$(DLLEXT) winedos16.dll$(DLLEXT): winedos/winedos.dll$(DLLEXT) winedos.dll$(DLLEXT): winedos/winedos.dll$(DLLEXT)
$(RM) $@ && $(LN_S) winedos/winedos.dll$(DLLEXT) $@ $(RM) $@ && $(LN_S) winedos/winedos.dll$(DLLEXT) $@
winejack.drv$(DLLEXT): winmm/winejack/winejack.drv$(DLLEXT) winejack.drv$(DLLEXT): winmm/winejack/winejack.drv$(DLLEXT)
@ -576,85 +575,85 @@ x11drv.dll$(DLLEXT): x11drv/x11drv.dll$(DLLEXT)
# Import libraries # Import libraries
IMPORT_LIBS = \ IMPORT_LIBS = \
libadvapi32.$(IMPLIBEXT) \ libadvapi32 \
libavicap32.$(IMPLIBEXT) \ libavicap32 \
libavifil32.$(IMPLIBEXT) \ libavifil32 \
libcabinet.$(IMPLIBEXT) \ libcabinet \
libcomcat.$(IMPLIBEXT) \ libcomcat \
libcomctl32.$(IMPLIBEXT) \ libcomctl32 \
libcomdlg32.$(IMPLIBEXT) \ libcomdlg32 \
libcrtdll.$(IMPLIBEXT) \ libcrtdll \
libcrypt32.$(IMPLIBEXT) \ libcrypt32 \
libd3d8.$(IMPLIBEXT) \ libd3d8 \
libdciman32.$(IMPLIBEXT) \ libdciman32 \
libddraw.$(IMPLIBEXT) \ libddraw \
libdevenum.$(IMPLIBEXT) \ libdevenum \
libdinput.$(IMPLIBEXT) \ libdinput \
libdinput8.$(IMPLIBEXT) \ libdinput8 \
libdplay.$(IMPLIBEXT) \ libdplay \
libdplayx.$(IMPLIBEXT) \ libdplayx \
libdsound.$(IMPLIBEXT) \ libdsound \
libgdi32.$(IMPLIBEXT) \ libgdi32 \
libglu32.$(IMPLIBEXT) \ libglu32 \
libicmp.$(IMPLIBEXT) \ libicmp \
libimagehlp.$(IMPLIBEXT) \ libimagehlp \
libimm32.$(IMPLIBEXT) \ libimm32 \
libkernel32.$(IMPLIBEXT) \ libkernel32 \
liblz32.$(IMPLIBEXT) \ liblz32 \
libmapi32.$(IMPLIBEXT) \ libmapi32 \
libmpr.$(IMPLIBEXT) \ libmpr \
libmsacm32.$(IMPLIBEXT) \ libmsacm32 \
libmsdmo.$(IMPLIBEXT) \ libmsdmo \
libmsimg32.$(IMPLIBEXT) \ libmsimg32 \
libmsnet32.$(IMPLIBEXT) \ libmsnet32 \
libmsrle32.$(IMPLIBEXT) \ libmsrle32 \
libmsvcrt.$(IMPLIBEXT) \ libmsvcrt \
libmsvcrt20.$(IMPLIBEXT) \ libmsvcrt20 \
libmsvfw32.$(IMPLIBEXT) \ libmsvfw32 \
libnetapi32.$(IMPLIBEXT) \ libnetapi32 \
libntdll.$(IMPLIBEXT) \ libntdll \
libodbc32.$(IMPLIBEXT) \ libodbc32 \
libole32.$(IMPLIBEXT) \ libole32 \
liboleaut32.$(IMPLIBEXT) \ liboleaut32 \
libolecli32.$(IMPLIBEXT) \ libolecli32 \
liboledlg.$(IMPLIBEXT) \ liboledlg \
libolepro32.$(IMPLIBEXT) \ libolepro32 \
libolesvr32.$(IMPLIBEXT) \ libolesvr32 \
libopengl32.$(IMPLIBEXT) \ libopengl32 \
libpsapi.$(IMPLIBEXT) \ libpsapi \
libqcap.$(IMPLIBEXT) \ libqcap \
libquartz.$(IMPLIBEXT) \ libquartz \
librasapi32.$(IMPLIBEXT) \ librasapi32 \
libriched32.$(IMPLIBEXT) \ libriched32 \
librpcrt4.$(IMPLIBEXT) \ librpcrt4 \
libserialui.$(IMPLIBEXT) \ libserialui \
libsetupapi.$(IMPLIBEXT) \ libsetupapi \
libshdocvw.$(IMPLIBEXT) \ libshdocvw \
libshell32.$(IMPLIBEXT) \ libshell32 \
libshfolder.$(IMPLIBEXT) \ libshfolder \
libshlwapi.$(IMPLIBEXT) \ libshlwapi \
libsnmpapi.$(IMPLIBEXT) \ libsnmpapi \
libsti.$(IMPLIBEXT) \ libsti \
libtapi32.$(IMPLIBEXT) \ libtapi32 \
libttydrv.$(IMPLIBEXT) \ libttydrv \
libtwain_32.$(IMPLIBEXT) \ libtwain_32 \
liburl.$(IMPLIBEXT) \ liburl \
liburlmon.$(IMPLIBEXT) \ liburlmon \
libuser32.$(IMPLIBEXT) \ libuser32 \
libversion.$(IMPLIBEXT) \ libversion \
libw32skrnl.$(IMPLIBEXT) \ libw32skrnl \
libwinedos.$(IMPLIBEXT) \ libwinedos \
libwineps.$(IMPLIBEXT) \ libwineps \
libwininet.$(IMPLIBEXT) \ libwininet \
libwinmm.$(IMPLIBEXT) \ libwinmm \
libwinnls32.$(IMPLIBEXT) \ libwinnls32 \
libwinspool.$(IMPLIBEXT) \ libwinspool \
libwintrust.$(IMPLIBEXT) \ libwintrust \
libwnaspi32.$(IMPLIBEXT) \ libwnaspi32 \
libwow32.$(IMPLIBEXT) \ libwow32 \
libws2_32.$(IMPLIBEXT) \ libws2_32 \
libwsock32.$(IMPLIBEXT) \ libwsock32 \
libx11drv.$(IMPLIBEXT) libx11drv
libadvapi32.def: advapi32/advapi32.spec.def libadvapi32.def: advapi32/advapi32.spec.def
$(RM) $@ && $(LN_S) advapi32/advapi32.spec.def $@ $(RM) $@ && $(LN_S) advapi32/advapi32.spec.def $@
@ -1131,7 +1130,8 @@ winsock/ws2_32.spec.def: $(WINEBUILD)
wsock32/wsock32.spec.def: $(WINEBUILD) wsock32/wsock32.spec.def: $(WINEBUILD)
x11drv/x11drv.spec.def: $(WINEBUILD) x11drv/x11drv.spec.def: $(WINEBUILD)
$(SUBDIRS): $(IMPORT_LIBS) $(SUBDIRS): $(IMPORT_LIBS:%=%.$(IMPLIBEXT))
$(SUBDIRS:%=%/__crosstest__): $(IMPORT_LIBS:%=%.a)
# Map library name to the corresponding directory # Map library name to the corresponding directory
@ -1358,18 +1358,18 @@ install install-lib::
# Misc rules # Misc rules
install install-dev:: $(IMPORT_LIBS) install install-dev:: $(IMPORT_LIBS:%=%.$(IMPLIBEXT))
$(MKINSTALLDIRS) $(dlldir) $(MKINSTALLDIRS) $(dlldir)
for f in $(IMPORT_LIBS); do $(INSTALL_DATA) $$f $(dlldir)/$$f; done for f in $(IMPORT_LIBS:%=%.$(IMPLIBEXT)); do $(INSTALL_DATA) $$f $(dlldir)/$$f; done
install install-lib:: $(INSTALLSUBDIRS:%=%/__install__) install install-lib:: $(INSTALLSUBDIRS:%=%/__install__)
uninstall:: uninstall::
$(RM) $(IMPORT_LIBS:%=$(dlldir)/%) $(RM) $(IMPORT_LIBS:%=$(dlldir)/%.$(IMPLIBEXT))
-rmdir $(dlldir) -rmdir $(dlldir)
clean:: clean::
$(RM) $(IMPORT_LIBS) $(RM) $(IMPORT_LIBS:%=%.a) $(IMPORT_LIBS:%=%.def)
check test:: $(BUILDSUBDIRS:%=%/__test__) check test:: $(BUILDSUBDIRS:%=%/__test__)

View File

@ -44,7 +44,7 @@ $(MODULE).so: $(MODULE).spec.o $(OBJS) Makefile.in
# Rules for .exe main module # Rules for .exe main module
$(MODULE): $(OBJS) $(RCOBJS) $(IMPORTLIBS) Makefile.in $(MODULE): $(OBJS) $(RCOBJS) $(IMPORTLIBS) Makefile.in
$(CC) $(OBJS) $(RCOBJS) -o $@ $(DELAYIMPORTS:%=-l%) $(IMPORTS:%=-l%) $(ALL_LIBS) $(CC) $(OBJS) $(RCOBJS) -o $@ -L$(DLLDIR) $(DELAYIMPORTS:%=-l%) $(IMPORTS:%=-l%) $(ALL_LIBS)
# Rules for building test list # Rules for building test list
@ -64,7 +64,7 @@ $(TESTRESULTS): $(MODULE)$(DLLEXT) $(DLLDIR)/$(TESTDLL)$(DLLEXT)
crosstest:: @CROSSTEST@ crosstest:: @CROSSTEST@
$(CROSSTEST): $(CROSSOBJS) Makefile.in $(CROSSTEST): $(CROSSOBJS) Makefile.in
$(CROSSCC) $(CROSSOBJS) -o $@ $(DELAYIMPORTS:%=-l%) $(IMPORTS:%=-l%) $(LIBS) $(CROSSCC) $(CROSSOBJS) -o $@ -L$(DLLDIR) $(DELAYIMPORTS:%=-l%) $(IMPORTS:%=-l%) $(LIBS)
# Rules for cleaning # Rules for cleaning

View File

@ -211,7 +211,7 @@ print NEWMAKE "\n# Import libraries\n\nIMPORT_LIBS =";
foreach my $mod (sort @implibs) foreach my $mod (sort @implibs)
{ {
my $def = $mod; my $def = $mod;
$def =~ s/\.(dll|drv)$/.\$(IMPLIBEXT)/; $def =~ s/\.(dll|drv)$//;
printf NEWMAKE " \\\n\tlib%s", $def; printf NEWMAKE " \\\n\tlib%s", $def;
} }
print NEWMAKE "\n\n"; print NEWMAKE "\n\n";
@ -239,7 +239,8 @@ foreach my $mod (sort @implibs)
print NEWMAKE <<EOF; print NEWMAKE <<EOF;
\$(SUBDIRS): \$(IMPORT_LIBS) \$(SUBDIRS): \$(IMPORT_LIBS:%=%.\$(IMPLIBEXT))
\$(SUBDIRS:%=%/__crosstest__): \$(IMPORT_LIBS:%=%.a)
EOF EOF
@ -312,18 +313,18 @@ print NEWMAKE "\tfi\n\n";
print NEWMAKE <<EOF; print NEWMAKE <<EOF;
# Misc rules # Misc rules
install install-dev:: \$(IMPORT_LIBS) install install-dev:: \$(IMPORT_LIBS:%=%.\$(IMPLIBEXT))
\$(MKINSTALLDIRS) \$(dlldir) \$(MKINSTALLDIRS) \$(dlldir)
for f in \$(IMPORT_LIBS); do \$(INSTALL_DATA) \$\$f \$(dlldir)/\$\$f; done for f in \$(IMPORT_LIBS:%=%.\$(IMPLIBEXT)); do \$(INSTALL_DATA) \$\$f \$(dlldir)/\$\$f; done
install install-lib:: \$(INSTALLSUBDIRS:%=%/__install__) install install-lib:: \$(INSTALLSUBDIRS:%=%/__install__)
uninstall:: uninstall::
\$(RM) \$(IMPORT_LIBS:%=\$(dlldir)/%) \$(RM) \$(IMPORT_LIBS:%=\$(dlldir)/%.\$(IMPLIBEXT))
-rmdir \$(dlldir) -rmdir \$(dlldir)
clean:: clean::
\$(RM) \$(IMPORT_LIBS) \$(RM) \$(IMPORT_LIBS:%=%.a) \$(IMPORT_LIBS:%=%.def)
check test:: \$(BUILDSUBDIRS:%=%/__test__) check test:: \$(BUILDSUBDIRS:%=%/__test__)