1 TARGET64
=git_shell_ext64.dll
2 TARGET32
=git_shell_ext.dll
4 cross
= /src
/mingw-w64
/sysroot
/bin
/x86_64-w64-mingw32-
14 DLLWRAP
= $(cross
)dllwrap.exe
16 MODULES
=ext.c dll.c factory.c menu.c systeminfo.c registry.c \
18 OBJECTS
=${MODULES
:%.c
=%.o
} cheetah.o
19 COMMON_OBJ
= ..
/common
/cheetahmenu.o ..
/common
/date.o ..
/common
/debug.o \
20 ..
/common
/exec.o ..
/common
/menuengine.o \
21 ..
/common
/sha1_file.o ..
/common
/strbuf.o \
22 ..
/common
/usage.o ..
/common
/wrapper.o
23 COMPAT_OBJ
= ..
/compat
/mingw.o ..
/compat
/mmap.o ..
/compat
/pread.o \
24 ..
/compat
/strlcpy.o ..
/compat
/winansi.o
26 ifeq ($(shell uname
-o
2>/dev
/null
), Cygwin
)
27 OSCFLAGS
=-mno-cygwin
-mwin32
-mdll
28 OSDLLWRAPFLAG
=-mno-cygwin
--target
=i386-mingw32
29 DLL_PATH
=$(shell cygpath
-w
"`pwd`" | sed
-e
's|\\|\\\\\\\\|g')\\\\$(TARGET
)
31 DLL_PATH
=$(shell pwd
-W | sed
-e
's|/|\\\\\\\\|g')\\\\$(TARGET
)
34 # define _WIN32_IE, so IColumnProvider's structures are available
35 CFLAGS
=-O
-g
-DNO_MMAP
-DNO_PREAD
-DNO_STRLCPY
-D_WIN32_IE
=$(WIN32_IE
) $(OSCFLAGS
)
36 DLLWRAPFLAGS
= -Wl
,--enable-stdcall-fixup
$(OSDLLWRAPFLAG
)
38 MSYSGIT_PATH
=$(shell cd
/; pwd
-W | sed
-e
's|/|\\\\\\\\|g')
40 # export compile flags to sub-make of the common folder
46 $(MAKE
) -C ..
/common
all
49 $(CC
) $(CFLAGS
) $< -c
-o
$@
52 $(CC
) $(CFLAGS
) -MM
$(MODULES
) > deps
54 $(TARGET
): common-obj
$(OBJECTS
) $(COMPAT_OBJ
) deps git_shell_ext.def
55 $(DLLWRAP
) $(DLLWRAPFLAGS
) --def git_shell_ext.def \
56 $(COMMON_OBJ
) $(OBJECTS
) $(COMPAT_OBJ
) -o
$@ \
57 -luuid
-loleaut32
-lole32
-lws2_32
59 # gcc $(LDFLAGS) -o $@ $(OBJECTS) -lole32 -luuid -loleaut32
60 # dlltool -d git_shell_ext.def -l $@ $(OBJECTS)
65 regsvr32
-s
-n
-i
:machine
$(DLL_PATH
)
68 regsvr32
-u
-s
-n
-i
:machine
$(DLL_PATH
)
71 regsvr32
-s
$(DLL_PATH
)
74 regsvr32
-u
-s
$(DLL_PATH
)
77 -rm -f
$(OBJECTS
) $(COMPAT_OBJ
) $(TARGET
) deps
78 $(MAKE
) -C ..
/common
clean
81 -rm -f
$(TARGET32
) $(TARGET64
)
83 cheetah.o
: cheetah.rc ..
/common
/version.h