AUtomatic dependency generation. Runs on Linux (at least). Probably should
[ffmpeg.git] / vhook / Makefile
1 include ../config.mak
2
3 VPATH=$(SRC_PATH)/vhook
4
5 CFLAGS=-fPIC $(OPTFLAGS) -g -Wall -I.. -I$(SRC_PATH) -I$(SRC_PATH)/libavformat -I$(SRC_PATH)/libavcodec -DHAVE_AV_CONFIG_H
6
7 ifeq ($(CONFIG_DARWIN),yes)
8 SHFLAGS+=-bundle -flat_namespace -undefined suppress
9 endif
10 HOOKS=null.so fish.so
11
12 ifeq ($(HAVE_IMLIB2),yes)
13     HOOKS += imlib2.so
14 endif    
15
16 all: $(HOOKS) 
17
18 DEPS= $(HOOKS:.so=.d)
19
20 install:
21         install -s -m 755 $(HOOKS) $(INSTDIR)
22
23 imlib2.so: imlib2.o
24         $(CC) -g -o $@ $(SHFLAGS) $< -lImlib2
25
26 %.so: %.o
27         $(CC) -g -o $@ $(SHFLAGS) $<
28
29 %.d: %.c
30         @echo $@ \\ > $@
31         $(CC) $(CFLAGS) -MM $< >> $@
32
33 -include $(DEPS)        
34
35 %.html: %.texi
36         texi2html -monolithic -number $<
37
38 clean:
39         rm -f *.o *.d *.so *~