do not leak process handles opened by fork_process/CreateProcess
[git-cheetah/kirill.git] / nautilus / Makefile
blob64636fec3de882dc0eb974cc2a967e1df66d4eee
1 TARGET = git_cheetah_ext
2 MODULES = menu.c util.c plugin.c ../compat/posix.c
3 OBJECTS = ${MODULES:%.c=%.o}
5 LIBDIR = /usr/lib
6 LDFLAGS = -shared \
7 $(shell pkg-config --libs libnautilus-extension)
9 WFLAGS=-std=c99 -Wall -pedantic
11 # needed to get the proper declarations for glibc
12 COMPAT_CFLAGS = -D_POSIX_C_SOURCE=200112L -D_GNU_SOURCE
13 CFLAGS = $(WFLAGS) -fPIC -g $(COMPAT_CFLAGS) \
14 $(shell pkg-config --cflags libnautilus-extension)
16 export CFLAGS
18 all: $(TARGET).so
20 COMMON_OBJ = ../common/cheetahmenu.o ../common/date.o ../common/debug.o \
21 ../common/exec.o ../common/menuengine.o \
22 ../common/sha1_file.o ../common/strbuf.o \
23 ../common/usage.o ../common/wrapper.o
25 common-obj:
26 $(MAKE) -C ../common all
28 %.o : %.c
29 $(CC) $(CFLAGS) $< -c -o $@
31 deps: $(MODULES)
32 $(CC) $(CFLAGS) -MM $(MODULES) > deps
34 $(TARGET).so: $(OBJECTS) $(COMPAT_OBJ) common-obj
35 gcc $(LDFLAGS) $(OBJECTS) $(COMPAT_OBJ) $(COMMON_OBJ) \
36 -o $(TARGET).so
38 -include deps
40 install: all
41 mkdir -p $(LIBDIR)/nautilus/extensions-2.0
42 cp $(TARGET).so $(LIBDIR)/nautilus/extensions-2.0/
44 clean:
45 rm -f $(OBJECTS) $(COMPAT_OBJ) $(TARGET).so deps
46 $(MAKE) -C ../common clean