2002-11-21 05:50:36 +02:00
|
|
|
include ../config.mak
|
|
|
|
|
2002-11-26 05:35:18 +02:00
|
|
|
VPATH=$(SRC_PATH)/vhook
|
|
|
|
|
2005-08-01 23:07:05 +03:00
|
|
|
CFLAGS=-fPIC $(SHCFLAGS) -I.. -I$(SRC_PATH) -I$(SRC_PATH)/libavformat -I$(SRC_PATH)/libavcodec -I$(SRC_PATH)/libavutil -DHAVE_AV_CONFIG_H
|
2002-11-21 05:50:36 +02:00
|
|
|
|
2002-11-23 03:29:25 +02:00
|
|
|
ifeq ($(CONFIG_DARWIN),yes)
|
2005-10-22 22:10:14 +03:00
|
|
|
SHFLAGS += -flat_namespace -undefined suppress
|
2002-11-23 03:29:25 +02:00
|
|
|
endif
|
2005-09-26 13:05:13 +03:00
|
|
|
HOOKS=null$(SLIBSUF) fish$(SLIBSUF) ppm$(SLIBSUF) watermark$(SLIBSUF)
|
2002-11-21 05:50:36 +02:00
|
|
|
|
|
|
|
ifeq ($(HAVE_IMLIB2),yes)
|
2005-09-26 13:05:13 +03:00
|
|
|
HOOKS += imlib2$(SLIBSUF)
|
2005-12-17 20:14:38 +02:00
|
|
|
endif
|
2002-11-21 05:50:36 +02:00
|
|
|
|
2003-02-11 06:01:07 +02:00
|
|
|
ifeq ($(HAVE_FREETYPE2),yes)
|
2005-09-26 13:05:13 +03:00
|
|
|
HOOKS += drawtext$(SLIBSUF)
|
2003-02-11 06:01:07 +02:00
|
|
|
CFLAGS += `freetype-config --cflags`
|
2005-12-17 20:14:38 +02:00
|
|
|
endif
|
2003-02-11 06:01:07 +02:00
|
|
|
|
2005-12-17 20:14:38 +02:00
|
|
|
all: $(HOOKS)
|
2002-11-21 05:50:36 +02:00
|
|
|
|
2005-09-26 13:05:13 +03:00
|
|
|
SRCS := $(HOOKS:$(SLIBSUF)=.c)
|
2003-01-22 11:53:25 +02:00
|
|
|
|
2003-02-01 22:56:39 +02:00
|
|
|
depend: $(SRCS)
|
2003-01-22 11:53:25 +02:00
|
|
|
$(CC) -MM $(CFLAGS) $^ 1>.depend
|
2003-01-14 17:30:42 +02:00
|
|
|
|
2002-11-21 05:50:36 +02:00
|
|
|
install:
|
2005-03-16 21:11:58 +02:00
|
|
|
install -d "$(libdir)/vhook"
|
|
|
|
install -m 755 $(HOOKS) "$(libdir)/vhook"
|
2002-11-21 05:50:36 +02:00
|
|
|
|
2005-09-26 13:05:13 +03:00
|
|
|
imlib2$(SLIBSUF): imlib2.o
|
2005-07-11 03:15:37 +03:00
|
|
|
$(CC) $(LDFLAGS) -g -o $@ $(SHFLAGS) $< -lImlib2
|
2002-11-21 05:50:36 +02:00
|
|
|
|
2005-09-26 13:05:13 +03:00
|
|
|
drawtext$(SLIBSUF): drawtext.o
|
2005-07-11 03:15:37 +03:00
|
|
|
$(CC) $(LDFLAGS) -g -o $@ $(SHFLAGS) $< `freetype-config --libs`
|
2003-02-11 06:01:07 +02:00
|
|
|
|
2005-09-26 13:05:13 +03:00
|
|
|
%$(SLIBSUF): %.o
|
|
|
|
ifeq ($(CONFIG_DARWIN),yes)
|
2005-10-01 17:21:34 +03:00
|
|
|
$(CC) $(LDFLAGS) $(SHFLAGS) -Wl,-install_name,$(libdir)/vhook/$@ -g -o $@ $<
|
2005-09-26 13:05:13 +03:00
|
|
|
else
|
2005-07-11 03:15:37 +03:00
|
|
|
$(CC) $(LDFLAGS) -g -o $@ $(SHFLAGS) $<
|
2005-09-26 13:05:13 +03:00
|
|
|
endif
|
2002-11-21 05:50:36 +02:00
|
|
|
|
|
|
|
clean:
|
2005-09-26 13:05:13 +03:00
|
|
|
rm -f *.o *.d .depend *$(SLIBSUF) *~
|
2003-01-22 11:53:25 +02:00
|
|
|
|
|
|
|
ifneq ($(wildcard .depend),)
|
|
|
|
include .depend
|
|
|
|
endif
|