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.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. endif
  12. ifeq ($(HAVE_FREETYPE2),yes)
  13. HOOKS += drawtext$(SLIBSUF)
  14. CFLAGS += `freetype-config --cflags`
  15. endif
  16. all: $(HOOKS)
  17. SRCS := $(HOOKS:$(SLIBSUF)=.c)
  18. depend: $(SRCS)
  19. $(CC) -MM $(CFLAGS) $^ 1>.depend
  20. install: $(HOOKS)
  21. install -d "$(libdir)/vhook"
  22. install -m 755 $(HOOKS) "$(libdir)/vhook"
  23. imlib2$(SLIBSUF): imlib2.o
  24. $(CC) $(LDFLAGS) -g -o $@ $(SHFLAGS) $< -lImlib2
  25. drawtext$(SLIBSUF): drawtext.o
  26. $(CC) $(LDFLAGS) -g -o $@ $(SHFLAGS) $< `freetype-config --libs`
  27. %$(SLIBSUF): %.o
  28. $(CC) $(LDFLAGS) -g -o $@ $(SHFLAGS) $<
  29. clean:
  30. rm -f *.o *.d *~ *.a *.lib *.so *.dylib *.dll
  31. distclean: clean
  32. rm -f .depend
  33. ifneq ($(wildcard .depend),)
  34. include .depend
  35. endif