Build custom columns support with Makefile
[git-cheetah/kirill.git] / Makefile
blob53e76b0117bcaf16a8320e6f42f8aeb779502e0c
1 OBJECTS=ext.o debug.o dll.o factory.o menu.o systeminfo.o registry.o \
2 exec.o menuengine.o cheetahmenu.o columns.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 \
6 compat/winansi.o
8 ifeq ($(shell uname -o 2>/dev/null), Cygwin)
9 OSCFLAGS =-mno-cygwin -mwin32 -mdll
10 OSDLLWRAPFLAG =-mno-cygwin --target=i386-mingw32
11 endif
13 # define _WIN32_IE, so IColumnProvider's structures are available
14 CFLAGS=-O -g -DNO_MMAP -DNO_PREAD -DNO_STRLCPY -D_WIN32_IE=0x0500 $(OSCFLAGS)
15 DLLWRAPFLAGS = -Wl,--enable-stdcall-fixup $(OSDLLWRAPFLAG)
17 TARGET=git_shell_ext.dll
18 MSYSGIT_PATH=$(shell cd /; pwd -W | sed -e 's|/|\\\\\\\\|g')
19 DLL_PATH=$(shell pwd -W | sed -e 's|/|\\\\\\\\|g')\\\\$(TARGET)
21 all: $(TARGET)
23 .o:.c
24 $(CC) $(CFLAGS) $< -o $@
26 $(TARGET): $(OBJECTS) $(COMPAT_OBJ) git_shell_ext.def
27 dllwrap.exe $(DLLWRAPFLAGS) --def git_shell_ext.def \
28 $(OBJECTS) $(COMPAT_OBJ) -o $@ -luuid -loleaut32 -lole32 -lws2_32
30 # gcc $(LDFLAGS) -o $@ $(OBJECTS) -lole32 -luuid -loleaut32
31 # dlltool -d git_shell_ext.def -l $@ $(OBJECTS)
33 dll.o: dll.h ext.h factory.h systeminfo.h registry.h menuengine.h
34 ext.o: ext.h debug.h systeminfo.h menuengine.h
35 factory.o: factory.h ext.h menu.h menuengine.h columns.h
36 menu.o: menu.h ext.h debug.h systeminfo.h exec.h menuengine.h cheetahmenu.h
37 systeminfo.o: systeminfo.h
38 registry.o: registry.h
39 exec.o: debug.h systeminfo.h exec.h
40 cheetahmenu.o: exec.h menuengine.h cheetahmenu.h
41 menuengine.o: menuengine.h
42 columns.o: exec.h ext.h menuengine.h columns.h
44 $(COMPAT_OBJ) : $(COMPAT_H)
46 install: all
47 regsvr32 -s -n -i:machine $(DLL_PATH)
49 uninstall: all
50 regsvr32 -u -s -n -i:machine $(DLL_PATH)
52 install-user: all
53 regsvr32 -s $(DLL_PATH)
55 uninstall-user: all
56 regsvr32 -u -s $(DLL_PATH)
58 clean:
59 -rm -f $(OBJECTS) $(COMPAT_OBJ) $(TARGET)