Alexandre Julliard : makefiles: Move some of the cross-compile rules to the main rules file.

Alexandre Julliard julliard at winehq.org
Mon Jan 25 11:21:00 CST 2010


Module: wine
Branch: master
Commit: cce4387193f34f4528bd21ca95b0614cd4687f04
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=cce4387193f34f4528bd21ca95b0614cd4687f04

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Sat Jan 23 18:00:54 2010 +0100

makefiles: Move some of the cross-compile rules to the main rules file.

---

 Make.rules.in          |    8 +++++++-
 dlls/Maketest.rules.in |    9 ---------
 2 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/Make.rules.in b/Make.rules.in
index 1a279f8..05e82bd 100644
--- a/Make.rules.in
+++ b/Make.rules.in
@@ -52,6 +52,7 @@ LINTFLAGS = @LINTFLAGS@
 FONTFORGE = @FONTFORGE@
 RSVG      = @RSVG@
 ICOTOOL   = @ICOTOOL@
+CROSSCC   = @CROSSCC@
 FAKEEXT   = $(DLLEXT:.so=.fake)
 INCLUDES     = -I$(SRCDIR) -I. -I$(TOPSRCDIR)/include -I$(TOPOBJDIR)/include $(EXTRAINCL)
 EXTRACFLAGS  = @EXTRACFLAGS@
@@ -72,6 +73,7 @@ WRC          = $(TOOLSDIR)/tools/wrc/wrc$(TOOLSEXT)
 WMC          = $(TOOLSDIR)/tools/wmc/wmc$(TOOLSEXT)
 WIDL         = $(TOOLSDIR)/tools/widl/widl$(TOOLSEXT)
 WINEGCC      = $(TOOLSDIR)/tools/winegcc/winegcc $(TARGETFLAGS) -B$(TOOLSDIR)/tools/winebuild --sysroot=$(TOPOBJDIR)
+CROSSWINEGCC = $(TOOLSDIR)/tools/winegcc/winegcc @CROSSTARGETFLAGS@ -B$(TOOLSDIR)/tools/winebuild --sysroot=$(TOPOBJDIR)
 RELPATH      = $(TOOLSDIR)/tools/relpath$(TOOLSEXT)
 SFNT2FNT     = $(TOOLSDIR)/tools/sfnt2fnt$(TOOLSEXT)
 RC           = $(WRC)
@@ -120,6 +122,7 @@ CLEAN_TARGETS = $(IDL_GEN_C_SRCS) $(IDL_GEN_HEADERS) $(IDL_TLB_SRCS:.idl=.tlb) $
 OBJS = $(C_SRCS:.c=.o) $(BISON_SRCS:.y=.tab.o) $(LEX_SRCS:.l=.yy.o) $(IDL_GEN_C_SRCS:.c=.o) \
        $(RC_SRCS:.rc=.res) $(MC_SRCS:.mc=.mc.res) $(EXTRA_OBJS)
 
+CROSSOBJS = $(OBJS:.o=.cross.o)
 LINTS  = $(C_SRCS:.c=.ln)
 
 # 'all' target first in case the enclosing Makefile didn't define any target
@@ -133,11 +136,14 @@ filter: dummy
 
 # Implicit rules
 
-.SUFFIXES: .mc .rc .mc.rc .res .idl .tlb .h .y .l .tab.c .tab.h .yy.c .ok .man.in .man _c.c _i.c _p.c _s.c @MAINTAINER_MODE@ .sfd .ttf .svg .ico
+.SUFFIXES: .mc .rc .mc.rc .res .idl .tlb .h .y .l .tab.c .tab.h .yy.c .ok .man.in .man _c.c _i.c _p.c _s.c .cross.o @MAINTAINER_MODE@ .sfd .ttf .svg .ico
 
 .c.o:
 	$(CC) -c $(ALLCFLAGS) -o $@ $<
 
+.c.cross.o:
+	$(CROSSCC) -c $(INCLUDES) $(DEFS) $(CPPFLAGS) $(CFLAGS) -o $@ $<
+
 .y.tab.c:
 	$(BISON) $(BISONFLAGS) -p $*_ -o $@ $<
 
diff --git a/dlls/Maketest.rules.in b/dlls/Maketest.rules.in
index 95f5c2b..446ae72 100644
--- a/dlls/Maketest.rules.in
+++ b/dlls/Maketest.rules.in
@@ -22,8 +22,6 @@ ALL_LIBS     = $(IMPORTS:%=-l%) $(EXTRALIBS) $(LDFLAGS) $(LIBS)
 EXTRA_OBJS   = testlist.o
 
 CROSSTEST    = $(TESTDLL:%.dll=%)_crosstest.exe
-CROSSCC      = @CROSSCC@
-CROSSWINEGCC = $(TOOLSDIR)/tools/winegcc/winegcc @CROSSTARGETFLAGS@ -B$(TOOLSDIR)/tools/winebuild --sysroot=$(TOPOBJDIR)
 MAKEDEPFLAGS = -xo -xcross.o
 
 @MAKE_RULES@
@@ -48,13 +46,6 @@ $(TESTRESULTS): $(MODULE)$(DLLEXT) ../$(TESTDLL)$(DLLEXT)
 
 # Rules for cross-compiling tests
 
-CROSSOBJS = $(OBJS:.o=.cross.o)
-
-.SUFFIXES: .cross.o
-
-.c.cross.o:
-	$(CROSSCC) -c $(INCLUDES) $(DEFS) $(CPPFLAGS) $(CFLAGS) -o $@ $<
-
 crosstest:: @CROSSTEST@
 
 $(CROSSTEST): $(CROSSOBJS) Makefile.in




More information about the wine-cvs mailing list