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.

52 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. HOOKS=null$(SLIBSUF) fish$(SLIBSUF) ppm$(SLIBSUF) watermark$(SLIBSUF)
  7. ALLHOOKS=$(HOOKS) imlib2$(SLIBSUF) drawtext$(SLIBSUF)
  8. ifeq ($(HAVE_IMLIB2),yes)
  9. HOOKS += imlib2$(SLIBSUF)
  10. LIBS_imlib2$(SLIBSUF) = -lImlib2
  11. endif
  12. ifeq ($(HAVE_FREETYPE2),yes)
  13. HOOKS += drawtext$(SLIBSUF)
  14. CFLAGS += `freetype-config --cflags`
  15. LIBS_drawtext$(SLIBSUF) = `freetype-config --libs`
  16. endif
  17. SRCS := $(HOOKS:$(SLIBSUF)=.c)
  18. all: $(HOOKS)
  19. depend dep: $(SRCS)
  20. $(CC) -MM $(CFLAGS) $^ 1>.depend
  21. install: $(HOOKS)
  22. install -d "$(shlibdir)/vhook"
  23. install -m 755 $(HOOKS) "$(shlibdir)/vhook"
  24. uninstall:
  25. rm -f $(addprefix $(shlibdir)/vhook/,$(ALLHOOKS))
  26. -rmdir "$(shlibdir)/vhook/"
  27. %$(SLIBSUF): %.o
  28. $(CC) $(LDFLAGS) -o $@ $(VHOOKSHFLAGS) $< $(VHOOKLIBS) $(LIBS_$@)
  29. clean:
  30. rm -f *.o *.d *~ *.a *.lib *.so *.dylib *.dll
  31. distclean: clean
  32. rm -f .depend
  33. .PHONY: all depend dep clean distclean install* uninstall*
  34. ifneq ($(wildcard .depend),)
  35. include .depend
  36. endif