Makefile 708 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. include Makefile.env
  2. SRCS = $(wildcard *.c)
  3. OBJS = $(SRCS:.c=.o)
  4. ifeq ($(USE_NOFOREIGN),)
  5. ifeq ($(USE_DYNDEPS),)
  6. DEPS = imagequant freetype
  7. endif
  8. endif
  9. all: potrace $(DEPS) $(OBJS)
  10. unicode.h:
  11. php unicode.php
  12. potrace:
  13. @make -C potracelib all
  14. imagequant:
  15. @make -C libimagequant all
  16. freetype:
  17. ifeq ($(wildcard freetype2/objs/*.h),)
  18. @make -C freetype2 setup ansi
  19. endif
  20. @make -C freetype2 all
  21. %: %.c unicode.h
  22. $(CC) $(CFLAGS) $< -c $@
  23. libsfn.a: $(OBJS)
  24. @rm $@ 2>/dev/null || true
  25. @ar -frsv potracelib/*.o $(EXTRA) $@ $^
  26. clean:
  27. @rm *.a *.txt *.o 2>/dev/null || true
  28. distclean: clean
  29. @make -C potracelib clean || true
  30. @make -C libimagequant clean || true
  31. @make -C freetype2 distclean || true