finder: don't do own item-id calcluation
[git-cheetah/kirill.git] / finder / Makefile
blob6bccfc4861444170f5fb65fbdb5d2d93e32e7563
1 CFLAGS = -g -pedantic -Wall -std=c99
2 TARGET = git-cheetah
3 MODULES = menu.c util.c plugin.c ../compat/posix.c
5 OBJECTS=${MODULES:%.c=%.o}
7 COMMON_OBJ = ../common/cheetahmenu.o ../common/date.o ../common/debug.o \
8 ../common/exec.o ../common/menuengine.o \
9 ../common/sha1_file.o ../common/strbuf.o \
10 ../common/usage.o ../common/wrapper.o
12 export CFLAGS
14 all: $(TARGET).plugin
16 common-obj:
17 $(MAKE) -C ../common all
19 %.o : %.c
20 $(CC) $(CFLAGS) $< -c -o $@
22 deps: $(MODULES)
23 $(CC) $(CFLAGS) -MM $(MODULES) > deps
25 $(TARGET): $(OBJECTS) common-obj
26 gcc $(OBJECTS) $(COMMON_OBJ) \
27 -framework CoreFoundation \
28 -framework ApplicationServices \
29 -framework Carbon \
30 -bundle -o git-cheetah
32 $(TARGET).plugin: $(TARGET).plugin/Contents/MacOS/$(TARGET)
34 $(TARGET).plugin/Contents/MacOS/$(TARGET): $(TARGET) \
35 $(TARGET).plugin/Contents
36 mkdir -p $(TARGET).plugin/Contents/MacOS
37 cp $(TARGET) $(TARGET).plugin/Contents/MacOS/
39 $(TARGET).plugin/Contents: PkgInfo Info.plist
40 mkdir -p $(TARGET).plugin/Contents
41 cp PkgInfo $(TARGET).plugin/Contents/
42 cp Info.plist $(TARGET).plugin/Contents/
44 -include deps
46 install: all
47 rm -rf ~/Library/Contextual\ Menu\ Items/$(TARGET).plugin
48 mkdir -p ~/Library/Contextual\ Menu\ Items
49 cp -r $(TARGET).plugin ~/Library/Contextual\ Menu\ Items/$(TARGET).plugin
51 clean:
52 -rm -f $(OBJECTS) $(TARGET) deps
53 -rm -rf $(TARGET).plugin
54 $(MAKE) -C ../common clean