Commit 1f254216 authored by Alexandre Julliard's avatar Alexandre Julliard

makefiles: Add rules for cross-compiling static libraries.

parent 07af19f3
...@@ -53,6 +53,9 @@ FONTFORGE = @FONTFORGE@ ...@@ -53,6 +53,9 @@ FONTFORGE = @FONTFORGE@
RSVG = @RSVG@ RSVG = @RSVG@
ICOTOOL = @ICOTOOL@ ICOTOOL = @ICOTOOL@
CROSSCC = @CROSSCC@ CROSSCC = @CROSSCC@
CROSSTARGET = @CROSSTARGET@
CROSSAR = $(CROSSTARGET)-ar
CROSSRANLIB = $(CROSSTARGET)-ranlib
FAKEEXT = $(DLLEXT:.so=.fake) FAKEEXT = $(DLLEXT:.so=.fake)
INCLUDES = -I$(SRCDIR) -I. -I$(TOPSRCDIR)/include -I$(TOPOBJDIR)/include $(EXTRAINCL) INCLUDES = -I$(SRCDIR) -I. -I$(TOPSRCDIR)/include -I$(TOPOBJDIR)/include $(EXTRAINCL)
EXTRACFLAGS = @EXTRACFLAGS@ EXTRACFLAGS = @EXTRACFLAGS@
......
...@@ -653,7 +653,7 @@ X_PRE_LIBS ...@@ -653,7 +653,7 @@ X_PRE_LIBS
X_CFLAGS X_CFLAGS
XMKMF XMKMF
LIBPTHREAD LIBPTHREAD
CROSSTARGETFLAGS CROSSTARGET
CROSSTEST CROSSTEST
CROSSCC CROSSCC
CARBONLIB CARBONLIB
...@@ -6950,7 +6950,7 @@ test -n "$CROSSCC" || CROSSCC="false" ...@@ -6950,7 +6950,7 @@ test -n "$CROSSCC" || CROSSCC="false"
done done
if test -n "$target" if test -n "$target"
then then
CROSSTARGETFLAGS="-b $target" CROSSTARGET="$target"
fi fi
fi fi
......
...@@ -772,7 +772,7 @@ then ...@@ -772,7 +772,7 @@ then
done done
if test -n "$target" if test -n "$target"
then then
AC_SUBST(CROSSTARGETFLAGS,"-b $target") AC_SUBST(CROSSTARGET,"$target")
fi fi
fi fi
fi fi
......
...@@ -28,6 +28,8 @@ $(MODULE) $(MODULE).so $(MODULE).fake: $(MAINSPEC) $(OBJS) Makefile.in ...@@ -28,6 +28,8 @@ $(MODULE) $(MODULE).so $(MODULE).fake: $(MAINSPEC) $(OBJS) Makefile.in
# Rules for import libraries # Rules for import libraries
IMPLIB_CROSSOBJS = $(IMPLIB_OBJS:.o=.cross.o)
.PHONY: implib $(IMPLIB_SRCS:%=__static_implib__%) .PHONY: implib $(IMPLIB_SRCS:%=__static_implib__%)
all implib: $(IMPORTLIBFILE) $(IMPLIB_SRCS:%=__static_implib__%) all implib: $(IMPORTLIBFILE) $(IMPLIB_SRCS:%=__static_implib__%)
...@@ -43,7 +45,10 @@ $(IMPORTLIB:%=lib%.def.a): $(IMPLIB_OBJS) ...@@ -43,7 +45,10 @@ $(IMPORTLIB:%=lib%.def.a): $(IMPLIB_OBJS)
$(RANLIB) $@ $(RANLIB) $@
$(IMPORTLIB:%=lib%.a): $(MAINSPEC) $(IMPLIB_OBJS) $(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 $(SUBDIRS): implib
......
...@@ -21,6 +21,11 @@ $(MODULE:%=lib%.a): $(OBJS) Makefile.in ...@@ -21,6 +21,11 @@ $(MODULE:%=lib%.a): $(OBJS) Makefile.in
$(AR) $(ARFLAGS) $@ $(OBJS) $(AR) $(ARFLAGS) $@ $(OBJS)
$(RANLIB) $@ $(RANLIB) $@
$(MODULE:%=lib%.cross.a): $(CROSSOBJS) Makefile.in
$(RM) $@
$(CROSSAR) $(ARFLAGS) $@ $(CROSSOBJS)
$(CROSSRANLIB) $@
# Rules for installation # Rules for installation
install install-dev:: $(MODULE:%=lib%.a) $(DESTDIR)$(dlldir) install install-dev:: $(MODULE:%=lib%.a) $(DESTDIR)$(dlldir)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment