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.

51 lines
1.1KB

  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. ifeq ($(CONFIG_DARWIN),yes)
  5. SHFLAGS += -flat_namespace -undefined suppress
  6. endif
  7. HOOKS=null$(SLIBSUF) fish$(SLIBSUF) ppm$(SLIBSUF) watermark$(SLIBSUF)
  8. ifeq ($(HAVE_IMLIB2),yes)
  9. HOOKS += imlib2$(SLIBSUF)
  10. endif
  11. ifeq ($(HAVE_FREETYPE2),yes)
  12. HOOKS += drawtext$(SLIBSUF)
  13. CFLAGS += `freetype-config --cflags`
  14. endif
  15. all: $(HOOKS)
  16. SRCS := $(HOOKS:$(SLIBSUF)=.c)
  17. depend: $(SRCS)
  18. $(CC) -MM $(CFLAGS) $^ 1>.depend
  19. install:
  20. install -d "$(libdir)/vhook"
  21. install -m 755 $(HOOKS) "$(libdir)/vhook"
  22. imlib2$(SLIBSUF): imlib2.o
  23. $(CC) $(LDFLAGS) -g -o $@ $(SHFLAGS) $< -lImlib2
  24. drawtext$(SLIBSUF): drawtext.o
  25. $(CC) $(LDFLAGS) -g -o $@ $(SHFLAGS) $< `freetype-config --libs`
  26. %$(SLIBSUF): %.o
  27. ifeq ($(CONFIG_DARWIN),yes)
  28. $(CC) $(LDFLAGS) $(SHFLAGS) -Wl,-install_name,$(libdir)/vhook/$@ -g -o $@ $<
  29. else
  30. $(CC) $(LDFLAGS) -g -o $@ $(SHFLAGS) $<
  31. endif
  32. clean:
  33. rm -f *.o *.d .depend *$(SLIBSUF) *~
  34. ifneq ($(wildcard .depend),)
  35. include .depend
  36. endif