Makefile 892 Bytes
Newer Older
1 2
include ../config.mak

3 4
VPATH=$(SRC_PATH)/vhook

5
CFLAGS=-fPIC $(SHCFLAGS) -I.. -I$(SRC_PATH) -I$(SRC_PATH)/libavformat -I$(SRC_PATH)/libavcodec -DHAVE_AV_CONFIG_H
6

7
ifeq ($(CONFIG_DARWIN),yes)
8
SHFLAGS+=-flat_namespace -undefined suppress
9
endif
10
HOOKS=null.so fish.so ppm.so
11 12 13 14 15

ifeq ($(HAVE_IMLIB2),yes)
    HOOKS += imlib2.so
endif    

16 17 18 19 20
ifeq ($(HAVE_FREETYPE2),yes)
    HOOKS += drawtext.so
    CFLAGS += `freetype-config --cflags`
endif    

21
all: $(HOOKS) 
22

Fabrice Bellard's avatar
Fabrice Bellard committed
23
SRCS := $(HOOKS:.so=.c)
24

Fabrice Bellard's avatar
Fabrice Bellard committed
25
depend: $(SRCS)
26
	$(CC) -MM $(CFLAGS) $^ 1>.depend
27

28
install:
29 30
	install -d "$(prefix)/lib/vhook"
	install -m 755 $(HOOKS) "$(prefix)/lib/vhook"
31 32

imlib2.so: imlib2.o
33
	$(CC) -g -o $@ $(SHFLAGS) $< -lImlib2
34

35 36 37
drawtext.so: drawtext.o
	$(CC) -g -o $@ $(SHFLAGS) $< `freetype-config --libs`

38
%.so: %.o
39
	$(CC) -g -o $@ $(SHFLAGS) $<
40 41

clean:
42
	rm -f *.o *.d .depend *.so *~
43 44 45 46

ifneq ($(wildcard .depend),)
include .depend
endif