Remove unused variable prefix
[git-cheetah/kirill.git] / explorer / Makefile
blob9664dfb4293dfb0fe06a020a5478d8d678c3edd4
1 TARGET64=git_shell_ext64.dll
2 TARGET32=git_shell_ext.dll
3 ifneq (,$(W64))
4 cross = /src/mingw-w64/sysroot/bin/x86_64-w64-mingw32-
5 WIN32_IE=0x0501
6 TARGET=$(TARGET64)
7 else
8 cross = ""
9 WIN32_IE=0x0500
10 TARGET=$(TARGET32)
11 endif
13 CC = $(cross)gcc.exe
14 DLLWRAP = $(cross)dllwrap.exe
16 MODULES=ext.c dll.c factory.c menu.c systeminfo.c registry.c \
17 columns.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)
30 else
31 DLL_PATH=$(shell pwd -W | sed -e 's|/|\\\\\\\\|g')\\\\$(TARGET)
32 endif
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
41 export CFLAGS
43 all: $(TARGET)
45 common-obj:
46 $(MAKE) -C ../common all
48 %.o : %.c
49 $(CC) $(CFLAGS) $< -c -o $@
51 deps: $(MODULES)
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)
62 -include deps
64 install: all
65 regsvr32 -s -n -i:machine $(DLL_PATH)
67 uninstall:
68 regsvr32 -u -s -n -i:machine $(DLL_PATH)
70 install-user: all
71 regsvr32 -s $(DLL_PATH)
73 uninstall-user:
74 regsvr32 -u -s $(DLL_PATH)
76 platform-clean:
77 -rm -f $(OBJECTS) $(COMPAT_OBJ) $(TARGET) deps
78 $(MAKE) -C ../common clean
80 clean: platform-clean
81 -rm -f $(TARGET32) $(TARGET64)
83 cheetah.o: cheetah.rc ../common/version.h
84 windres -o $@ -i $<