Skip to content

Commit af09784

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 fa42978 commit af09784

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
@@ -573,6 +573,16 @@ else
573573
COMPAT_CFLAGS += -D__USE_MINGW_ANSI_STDIO
574574
NO_CURL = YesPlease
575575
endif
576+
OTHER_PROGRAMS += git-wrapper$(X)
577+
578+
git-wrapper$(X): compat/win32/git-wrapper.o git.res
579+
$(QUIET_LINK)$(CC) $(ALL_LDFLAGS) $(COMPAT_CFLAGS) \
580+
-fno-stack-protector -Wall -s -o $@ $^ -lshell32 -lshlwapi
581+
582+
compat/win32/git-wrapper.o: %.o: %.c GIT-PREFIX
583+
$(QUIET_CC)$(CC) $(ALL_CFLAGS) $(COMPAT_CFLAGS) \
584+
-fno-stack-protector -o $*.o -c -Wall -Wwrite-strings $<
585+
576586
endif
577587
endif
578588
ifeq ($(uname_S),QNX)

0 commit comments

Comments
 (0)