makefiles: Add rules for cross-compiling static libraries.
This commit is contained in:
parent
07af19f3ab
commit
1f254216d1
|
@ -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@
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -772,7 +772,7 @@ then
|
|||
done
|
||||
if test -n "$target"
|
||||
then
|
||||
AC_SUBST(CROSSTARGETFLAGS,"-b $target")
|
||||
AC_SUBST(CROSSTARGET,"$target")
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue