Skip to content

Commit f68457a

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 f5ab99d commit f68457a

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
@@ -569,6 +569,16 @@ else
569569
COMPAT_CFLAGS += -D__USE_MINGW_ANSI_STDIO
570570
NO_CURL = YesPlease
571571
endif
572+
OTHER_PROGRAMS += git-wrapper$(X)
573+
574+
git-wrapper$(X): compat/win32/git-wrapper.o git.res
575+
$(QUIET_LINK)$(CC) $(ALL_LDFLAGS) $(COMPAT_CFLAGS) \
576+
-fno-stack-protector -Wall -s -o $@ $^ -lshell32 -lshlwapi
577+
578+
compat/win32/git-wrapper.o: %.o: %.c GIT-PREFIX
579+
$(QUIET_CC)$(CC) $(ALL_CFLAGS) $(COMPAT_CFLAGS) \
580+
-fno-stack-protector -o $*.o -c -Wall -Wwrite-strings $<
581+
572582
endif
573583
endif
574584
ifeq ($(uname_S),QNX)

0 commit comments

Comments
 (0)