Makefile 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. CFLAGS += -std=c99
  2. hipack_PATH ?= .
  3. hipack_OBJS = ${hipack_PATH}/hipack-parser.o \
  4. ${hipack_PATH}/hipack-writer.o \
  5. ${hipack_PATH}/hipack-string.o \
  6. ${hipack_PATH}/hipack-alloc.o \
  7. ${hipack_PATH}/hipack-list.o \
  8. ${hipack_PATH}/hipack-dict.o \
  9. ${hipack_PATH}/hipack-misc.o
  10. hipack = ${hipack_PATH}/libhipack.a
  11. hipack: ${hipack}
  12. hipack-clean:
  13. ${RM} ${hipack} ${hipack_OBJS}
  14. ${RM} ${hipack_PATH}/tools/*.o \
  15. ${hipack_PATH}/tools/hipack-cat \
  16. ${hipack_PATH}/tools/hipack-get \
  17. ${hipack_PATH}/tools/hipack-parse \
  18. ${hipack_PATH}/tools/hipack-roundtrip
  19. ${hipack_OBJS}: ${hipack_PATH}/hipack.h
  20. ${hipack}: ${hipack_OBJS}
  21. ${AR} rc ${hipack} ${hipack_OBJS}
  22. hipack-tools: \
  23. ${hipack_PATH}/tools/hipack-cat \
  24. ${hipack_PATH}/tools/hipack-get \
  25. ${hipack_PATH}/tools/hipack-parse \
  26. ${hipack_PATH}/tools/hipack-roundtrip
  27. ${hipack_PATH}/tools/hipack-cat: \
  28. ${hipack_PATH}/tools/hipack-cat.o ${hipack}
  29. ${hipack_PATH}/tools/hipack-get: \
  30. ${hipack_PATH}/tools/hipack-get.o ${hipack}
  31. ${hipack_PATH}/tools/hipack-parse: \
  32. ${hipack_PATH}/tools/hipack-parse.o ${hipack}
  33. ${hipack_PATH}/tools/hipack-roundtrip: \
  34. ${hipack_PATH}/tools/hipack-roundtrip.o ${hipack}
  35. hipack-check: hipack-tools
  36. @bash --norc ${hipack_PATH}/tools/run-tests
  37. ${hipack_PATH}/hipack-writer.o: ${hipack_PATH}/fpconv/src/fpconv.c
  38. ${hipack_PATH}/fpconv/src/fpconv.c: ${hipack_PATH}/.gitmodules
  39. cd ${hipack_PATH} && git submodule init fpconv
  40. cd ${hipack_PATH} && git submodule update fpconv
  41. touch $@
  42. ${hipack_PATH}/doc/apiref.rst: ${hipack_PATH}/hipack.h ${hipack_PATH}/tools/extract-docs.awk
  43. awk -f ${hipack_PATH}/tools/extract-docs.awk $< > $@
  44. doc: ${hipack_PATH}/doc/apiref.rst
  45. ${MAKE} -C ${hipack_PATH}/doc html
  46. .PHONY: hipack hipack-objs hipack-tools hipack-check doc