Unify imports and libraries handling among dlls and tests
Dmitry Timoshkov
dmitry at codeweavers.com
Tue Jul 18 23:06:40 CDT 2006
Hello,
this patch fixes building the tests in cygwin, otherwise linker can't find
import libraries. I left crosscompiling still use platform provided import
libraries although, but that can be changed as well to make crosscompiling
tests work again.
Changelog:
Unify imports and libraries handling among dlls and tests.
--- cvs/hq/wine/dlls/Maketest.rules.in Wed Jul 12 15:09:16 2006
+++ wine/dlls/Maketest.rules.in Wed Jul 19 03:58:08 2006
@@ -19,7 +19,9 @@ TESTPROGRAM = $(MODULE)$(DLLEXT)
RUNTESTFLAGS = -q -P wine -M $(TESTDLL) -T $(TOPOBJDIR) -p $(TESTPROGRAM)
C_SRCS = $(CTESTS) $(TESTLIST)
-ALL_LIBS = $(IMPORTS:%=-l%) $(EXTRALIBS) $(LDFLAGS) $(LIBS)
+ALL_LIBS = $(EXTRALIBS) $(LIBPORT) $(LDFLAGS) $(LIBS)
+ALL_IMPORTS = $(DELAYIMPORTS) $(IMPORTS)
+DLL_LDPATH = -L$(DLLDIR) $(ALL_IMPORTS:%=-L$(DLLDIR)/%)
CROSSTEST = $(TESTDLL:%.dll=%)_crosstest.exe
CROSSOBJS = $(C_SRCS:.c=.cross.o) $(RC_SRCS:.rc=.res.cross.o)
@@ -33,12 +35,12 @@ all: $(TESTPROGRAM)
# Rules for .so main module
$(MODULE).so: $(OBJS) $(RC_SRCS:.rc=.res) Makefile.in
- $(WINEGCC) -B$(TOOLSDIR)/tools/winebuild -mconsole $(OBJS) $(RC_SRCS:.rc=.res) -o $@ $(LIBPORT) $(ALL_LIBS)
+ $(WINEGCC) -B$(TOOLSDIR)/tools/winebuild -mconsole $(OBJS) $(RC_SRCS:.rc=.res) -o $@ $(DLL_LDPATH) $(ALL_IMPORTS:%=-l%) $(ALL_LIBS)
# Rules for .exe main module
$(MODULE): $(OBJS) $(RCOBJS) Makefile.in
- $(CC) $(OBJS) $(RCOBJS) -o $@ $(ALL_LIBS)
+ $(CC) $(OBJS) $(RCOBJS) -o $@ $(DLL_LDPATH) $(ALL_IMPORTS:%=-l%) $(ALL_LIBS)
# Rules for building test list
@@ -66,7 +68,7 @@ $(TESTRESULTS): $(MODULE)$(DLLEXT) ../$(
crosstest:: @CROSSTEST@
$(CROSSTEST): $(CROSSOBJS) Makefile.in
- $(CROSSCC) $(CROSSOBJS) -o $@ $(ALL_LIBS)
+ $(CROSSCC) $(CROSSOBJS) -o $@ $(ALL_IMPORTS:%=-l%) $(ALL_LIBS)
# Rules for cleaning
More information about the wine-patches
mailing list