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=-fPIC $(SHCFLAGS) -I.. -I$(SRC_PATH) -I$(SRC_PATH)/libavformat -I$(SRC_PATH)/libavcodec -I$(SRC_PATH)/libavutil -DHAVE_AV_CONFIG_H
  4. #FIXME: This needs to be in configure/config.mak
  5. ifeq ($(CONFIG_DARWIN),yes)
  6. SHFLAGS = -dynamiclib -Wl,-single_module -flat_namespace -undefined suppress -Wl,-install_name,$(libdir)/vhook/$@
  7. endif
  8. HOOKS=null$(SLIBSUF) fish$(SLIBSUF) ppm$(SLIBSUF) watermark$(SLIBSUF)
  9. ifeq ($(HAVE_IMLIB2),yes)
  10. HOOKS += imlib2$(SLIBSUF)
  11. LDFLAGS += -lImlib2
  12. endif
  13. ifeq ($(HAVE_FREETYPE2),yes)
  14. HOOKS += drawtext$(SLIBSUF)
  15. CFLAGS += `freetype-config --cflags`
  16. LDFLAGS += `freetype-config --libs`
  17. endif
  18. all: $(HOOKS)
  19. SRCS := $(HOOKS:$(SLIBSUF)=.c)
  20. depend: $(SRCS)
  21. $(CC) -MM $(CFLAGS) $^ 1>.depend
  22. install: $(HOOKS)
  23. install -d "$(libdir)/vhook"
  24. install -m 755 $(HOOKS) "$(libdir)/vhook"
  25. ALLHOOKS=$(HOOKS) imlib2$(SLIBSUF) drawtext$(SLIBSUF)
  26. uninstall:
  27. rm -f $(addprefix $(libdir)/vhook/,$(ALLHOOKS))
  28. -rmdir "$(libdir)/vhook/"
  29. %$(SLIBSUF): %.o
  30. $(CC) $(LDFLAGS) -g -o $@ $(SHFLAGS) $<
  31. clean:
  32. rm -f *.o *.d *~ *.a *.lib *.so *.dylib *.dll
  33. distclean: clean
  34. rm -f .depend
  35. ifneq ($(wildcard .depend),)
  36. include .depend
  37. endif