On Tue, 18 Aug 2009, Marius Storm-Olsen wrote: > From: Marius Storm-Olsen <mstormo@xxxxxxxxx> > > By using GNU Make we can also compile with the MSVC toolchain. > This is a rudementary patch, only meant as an RFC for now!! > > !! DO NOT COMMIT THIS UPSTREAM !! > --- > So, instead of rely on these vcproj files which *will* go stale, we can > simply use the same Makefile system which everyone else is using. :) > After all, we're just compiling with a different compiler. The end result > will still rely on the *msysGit environment* to function, so we already > require it. Thus, GNU Make is present, and we can use it. > > This implementation is a quick hack to make it compile (hence the RFC > subject), so please don't even consider basing anything ontop of it ;) > > But, do point out all the do's and don'ts, and I'll try to polish it up > to something which we can add to Frank's series.. > > > Makefile | 97 +++++++++++++++++++++++++++++++++++++++++++++++--------- > compat/msvc.h | 77 +++++++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 158 insertions(+), 16 deletions(-) > > diff --git a/Makefile b/Makefile > index daf4296..2e14976 100644 > --- a/Makefile > +++ b/Makefile > @@ -214,9 +214,13 @@ uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not') > > CFLAGS = -g -O2 -Wall > LDFLAGS = > +ARFLAGS = rcs\ # whitespace intentional > ALL_CFLAGS = $(CFLAGS) > ALL_LDFLAGS = $(LDFLAGS) > STRIP ?= strip > +COMPFLAG = -c > +COBJFLAG = -o\ # whitespace intended > +LOBJFLAG = -o\ # whitespace intended I think it's nicer to write the significant whitespace with non-whitespace text using something like: empty= space=$(empty) $(empty) (...) ARFLAGS = rcs$(space) COBJFLAG = -o$(space) On the other hand, I think it would be clearer to put the "rcs" in the default version of $(AR), and have a $(AROBJFLAG) set to nothing there, since the "rcs" isn't actually at all like the "-OUT:" with respect to what it's doing there. Possibly also to have two variables for the output of the toolchain wrapper, one that is before the name of the file and one that's attached to the name of the file. -Daniel *This .sig left intentionally blank* -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html