Skip to content

Commit 2b6e065

Browse files
committed
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 <[email protected]>
1 parent 0f0d2e1 commit 2b6e065

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

config.mak.uname

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,16 @@ else
570570
COMPAT_CFLAGS += -D__USE_MINGW_ANSI_STDIO
571571
NO_CURL = YesPlease
572572
endif
573+
OTHER_PROGRAMS += git-wrapper$(X)
574+
575+
git-wrapper$(X): compat/win32/git-wrapper.o git.res
576+
$(QUIET_LINK)$(CC) $(ALL_LDFLAGS) $(COMPAT_CFLAGS) \
577+
-fno-stack-protector -Wall -s -o $@ $^ -lshell32 -lshlwapi
578+
579+
compat/win32/git-wrapper.o: %.o: %.c GIT-PREFIX
580+
$(QUIET_CC)$(CC) $(ALL_CFLAGS) $(COMPAT_CFLAGS) \
581+
-fno-stack-protector -o $*.o -c -Wall -Wwrite-strings $<
582+
573583
endif
574584
endif
575585
ifeq ($(uname_S),QNX)

0 commit comments

Comments
 (0)