You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.2KB

  1. include ../config.mak
  2. VPATH=$(SRC_PATH)/vhook
  3. CFLAGS=-I$(BUILD_ROOT) -I$(SRC_PATH) -I$(SRC_PATH)/libavutil -I$(SRC_PATH)/libavcodec \
  4. -I$(SRC_PATH)/libavformat $(VHOOKCFLAGS) -DHAVE_AV_CONFIG_H
  5. LDFLAGS+= -g
  6. ifeq ($(CONFIG_SWSCALER),yes)
  7. CFLAGS := -I$(SRC_PATH)/libswscale $(CFLAGS)
  8. endif
  9. HOOKS=null$(SLIBSUF) fish$(SLIBSUF) ppm$(SLIBSUF) watermark$(SLIBSUF)
  10. ALLHOOKS=$(HOOKS) imlib2$(SLIBSUF) drawtext$(SLIBSUF)
  11. ifeq ($(HAVE_IMLIB2),yes)
  12. HOOKS += imlib2$(SLIBSUF)
  13. LIBS_imlib2$(SLIBSUF) = -lImlib2
  14. endif
  15. ifeq ($(HAVE_FREETYPE2),yes)
  16. HOOKS += drawtext$(SLIBSUF)
  17. CFLAGS += `freetype-config --cflags`
  18. LIBS_drawtext$(SLIBSUF) = `freetype-config --libs`
  19. endif
  20. SRCS := $(HOOKS:$(SLIBSUF)=.c)
  21. all: $(HOOKS)
  22. depend dep: $(SRCS)
  23. $(CC) -MM $(CFLAGS) $^ 1>.depend
  24. install: $(HOOKS)
  25. install -d "$(shlibdir)/vhook"
  26. install -m 755 $(HOOKS) "$(shlibdir)/vhook"
  27. uninstall:
  28. rm -f $(addprefix $(shlibdir)/vhook/,$(ALLHOOKS))
  29. -rmdir "$(shlibdir)/vhook/"
  30. %$(SLIBSUF): %.o
  31. $(CC) $(LDFLAGS) -o $@ $(VHOOKSHFLAGS) $< $(VHOOKLIBS) $(LIBS_$@)
  32. clean:
  33. rm -f *.o *.d *~ *.a *.lib *.so *.dylib *.dll
  34. distclean: clean
  35. rm -f .depend
  36. .PHONY: all depend dep clean distclean install* uninstall*
  37. ifneq ($(wildcard .depend),)
  38. include .depend
  39. endif