Make mingw_spawn* buildable by VS 2008
[git-cheetah/kirill.git] / Makefile
blobbde8552fbb04ad6afca0b9c3c8b91ab8467675b0
1 OBJECTS=ext.o debug.o dll.o factory.o menu.o systeminfo.o registry.o exec.o
2 CFLAGS=-O -g -DNO_MMAP -DNO_PREAD -DNO_STRLCPY
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 \
6 compat/winansi.o
8 TARGET=git_shell_ext.dll
9 MSYSGIT_PATH=$(shell cd /; pwd -W | sed -e 's|/|\\\\\\\\|g')
10 DLL_PATH=$(shell pwd -W | sed -e 's|/|\\\\\\\\|g')\\\\$(TARGET)
12 all: $(TARGET)
14 .o:.c
15 $(CC) $(CFLAGS) $< -o $@
17 $(TARGET): $(OBJECTS) $(COMPAT_OBJ) git_shell_ext.def
18 dllwrap.exe --enable-stdcall-fixup --def git_shell_ext.def \
19 $(OBJECTS) $(COMPAT_OBJ) -o $@ -luuid -loleaut32 -lole32 -lws2_32
21 # gcc $(LDFLAGS) -o $@ $(OBJECTS) -lole32 -luuid -loleaut32
22 # dlltool -d git_shell_ext.def -l $@ $(OBJECTS)
24 dll.o: dll.h ext.h factory.h systeminfo.h registry.h
25 ext.o: ext.h debug.h systeminfo.h
26 factory.o: factory.h ext.h menu.h
27 menu.o: menu.h ext.h debug.h systeminfo.h exec.h
28 systeminfo.o: systeminfo.h
29 registry.o: registry.h
30 exec.o: debug.h systeminfo.h exec.h
31 $(COMPAT_OBJ) : $(COMPAT_H)
33 install: all
34 regsvr32 -s -n -i:machine $(DLL_PATH)
36 uninstall: all
37 regsvr32 -u -s -n -i:machine $(DLL_PATH)
39 install-user: all
40 regsvr32 -s $(DLL_PATH)
42 uninstall-user: all
43 regsvr32 -u -s $(DLL_PATH)
45 clean:
46 -rm -f $(OBJECTS) $(COMPAT_OBJ) $(TARGET)