mingw: Compile the Git wrapper

We take care to embed the manifest, too, because we will modify the
wrapper in the next few commits to serve as a drop-in replacement for
the built-ins, i.e. we will want to call the wrapper under names such
as 'git-patch-id.exe', too.

To allow 32-bit and 64-bit builds in the same directory, we let
git-wrapper.o depend on GIT-PREFIX so that it gets recompiled when
compiling for a different architecture.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
Johannes Schindelin
2015-03-13 15:36:41 +01:00
parent 8c8db31499
commit df04b69460

View File

@@ -572,6 +572,16 @@ else
COMPAT_CFLAGS += -D__USE_MINGW_ANSI_STDIO
NO_CURL = YesPlease
endif
OTHER_PROGRAMS += git-wrapper$(X)
git-wrapper$(X): compat/win32/git-wrapper.o git.res
$(QUIET_LINK)$(CC) $(ALL_LDFLAGS) $(COMPAT_CFLAGS) \
-fno-stack-protector -Wall -s -o $@ $^ -lshell32 -lshlwapi
compat/win32/git-wrapper.o: %.o: %.c GIT-PREFIX
$(QUIET_CC)$(CC) $(ALL_CFLAGS) $(COMPAT_CFLAGS) \
-fno-stack-protector -o $*.o -c -Wall -Wwrite-strings $<
endif
endif
ifeq ($(uname_S),QNX)