diff --git a/Make.rules.in b/Make.rules.in index 05e82bd9548..057d9b83944 100644 --- a/Make.rules.in +++ b/Make.rules.in @@ -53,6 +53,9 @@ FONTFORGE = @FONTFORGE@ RSVG = @RSVG@ ICOTOOL = @ICOTOOL@ CROSSCC = @CROSSCC@ +CROSSTARGET = @CROSSTARGET@ +CROSSAR = $(CROSSTARGET)-ar +CROSSRANLIB = $(CROSSTARGET)-ranlib FAKEEXT = $(DLLEXT:.so=.fake) INCLUDES = -I$(SRCDIR) -I. -I$(TOPSRCDIR)/include -I$(TOPOBJDIR)/include $(EXTRAINCL) EXTRACFLAGS = @EXTRACFLAGS@ diff --git a/configure b/configure index f856b23c2f9..9eabf3ce12b 100755 --- a/configure +++ b/configure @@ -653,7 +653,7 @@ X_PRE_LIBS X_CFLAGS XMKMF LIBPTHREAD -CROSSTARGETFLAGS +CROSSTARGET CROSSTEST CROSSCC CARBONLIB @@ -6950,7 +6950,7 @@ test -n "$CROSSCC" || CROSSCC="false" done if test -n "$target" then - CROSSTARGETFLAGS="-b $target" + CROSSTARGET="$target" fi fi diff --git a/configure.ac b/configure.ac index ef95fe79c30..4e9d26391c9 100644 --- a/configure.ac +++ b/configure.ac @@ -772,7 +772,7 @@ then done if test -n "$target" then - AC_SUBST(CROSSTARGETFLAGS,"-b $target") + AC_SUBST(CROSSTARGET,"$target") fi fi fi diff --git a/dlls/Makedll.rules.in b/dlls/Makedll.rules.in index 044d336e739..c3c8c67c202 100644 --- a/dlls/Makedll.rules.in +++ b/dlls/Makedll.rules.in @@ -28,6 +28,8 @@ $(MODULE) $(MODULE).so $(MODULE).fake: $(MAINSPEC) $(OBJS) Makefile.in # Rules for import libraries +IMPLIB_CROSSOBJS = $(IMPLIB_OBJS:.o=.cross.o) + .PHONY: implib $(IMPLIB_SRCS:%=__static_implib__%) all implib: $(IMPORTLIBFILE) $(IMPLIB_SRCS:%=__static_implib__%) @@ -43,7 +45,10 @@ $(IMPORTLIB:%=lib%.def.a): $(IMPLIB_OBJS) $(RANLIB) $@ $(IMPORTLIB:%=lib%.a): $(MAINSPEC) $(IMPLIB_OBJS) - $(WINEBUILD) $(IMPLIBFLAGS) @CROSSTARGETFLAGS@ -w --implib -o $@ --export $(SRCDIR)/$(MAINSPEC) $(IMPLIB_OBJS) + $(WINEBUILD) $(IMPLIBFLAGS) -w --implib -o $@ --export $(SRCDIR)/$(MAINSPEC) $(IMPLIB_OBJS) + +$(IMPORTLIB:%=lib%.cross.a): $(MAINSPEC) $(IMPLIB_CROSSOBJS) + $(WINEBUILD) $(IMPLIBFLAGS) $(CROSSTARGET:%=-b %) -w --implib -o $@ --export $(SRCDIR)/$(MAINSPEC) $(IMPLIB_CROSSOBJS) $(SUBDIRS): implib diff --git a/dlls/Makeimplib.rules.in b/dlls/Makeimplib.rules.in index 380101fa63d..da36eeebf1b 100644 --- a/dlls/Makeimplib.rules.in +++ b/dlls/Makeimplib.rules.in @@ -21,6 +21,11 @@ $(MODULE:%=lib%.a): $(OBJS) Makefile.in $(AR) $(ARFLAGS) $@ $(OBJS) $(RANLIB) $@ +$(MODULE:%=lib%.cross.a): $(CROSSOBJS) Makefile.in + $(RM) $@ + $(CROSSAR) $(ARFLAGS) $@ $(CROSSOBJS) + $(CROSSRANLIB) $@ + # Rules for installation install install-dev:: $(MODULE:%=lib%.a) $(DESTDIR)$(dlldir)