1 OBJECTS
=ext.o debug.o dll.o factory.o menu.o systeminfo.o registry.o \
2 exec.o menuengine.o cheetahmenu.o
3 COMPAT_H
= cache.h git-compat-util.h hash.h strbuf.h compat
/mingw.h
4 COMPAT_OBJ
= date.o sha1_file.o strbuf.o usage.o wrapper.o \
5 compat
/mingw.o compat
/mmap.o compat
/pread.o compat
/strlcpy.o \
8 ifeq ($(shell uname
-o
2>/dev
/null
), Cygwin
)
9 OSCFLAGS
=-mno-cygwin
-mwin32
-mdll
10 OSDLLWRAPFLAG
=-mno-cygwin
--target
=i386-mingw32
13 CFLAGS
=-O
-g
-DNO_MMAP
-DNO_PREAD
-DNO_STRLCPY
$(OSCFLAGS
)
14 DLLWRAPFLAGS
= --kill-at
--enable-stdcall-fixup
$(OSDLLWRAPFLAG
)
16 TARGET
=git_shell_ext.dll
17 MSYSGIT_PATH
=$(shell cd
/; pwd
-W | sed
-e
's|/|\\\\\\\\|g')
18 DLL_PATH
=$(shell pwd
-W | sed
-e
's|/|\\\\\\\\|g')\\\\$(TARGET
)
23 $(CC
) $(CFLAGS
) $< -o
$@
25 $(TARGET
): $(OBJECTS
) $(COMPAT_OBJ
) git_shell_ext.def
26 dllwrap.exe
$(DLLWRAPFLAGS
) --def git_shell_ext.def \
27 $(OBJECTS
) $(COMPAT_OBJ
) -o
$@
-luuid
-loleaut32
-lole32
-lws2_32
29 # gcc $(LDFLAGS) -o $@ $(OBJECTS) -lole32 -luuid -loleaut32
30 # dlltool -d git_shell_ext.def -l $@ $(OBJECTS)
32 dll.o
: dll.h ext.h factory.h systeminfo.h registry.h menuengine.h
33 ext.o
: ext.h debug.h systeminfo.h menuengine.h
34 factory.o
: factory.h ext.h menu.h menuengine.h
35 menu.o
: menu.h ext.h debug.h systeminfo.h exec.h menuengine.h cheetahmenu.h
36 systeminfo.o
: systeminfo.h
37 registry.o
: registry.h
38 exec.o
: debug.h systeminfo.h exec.h
39 cheetahmenu.o
: exec.h menuengine.h cheetahmenu.h
40 menuengine.o
: menuengine.h
42 $(COMPAT_OBJ
) : $(COMPAT_H
)
45 regsvr32
-s
-n
-i
:machine
$(DLL_PATH
)
48 regsvr32
-u
-s
-n
-i
:machine
$(DLL_PATH
)
51 regsvr32
-s
$(DLL_PATH
)
54 regsvr32
-u
-s
$(DLL_PATH
)
57 -rm -f
$(OBJECTS
) $(COMPAT_OBJ
) $(TARGET
)