i will have to rename this shit
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.

39 lines
876B

  1. .PHONY: clean run test
  2. WRAP := valgrind --track-origins=yes --leak-check=full --show-leak-kinds=all
  3. CFLAGS += -fno-builtin -I/usr/include/libircclient/
  4. ifeq ($(DEBUG), 1)
  5. CFLAGS += -Wall -Wextra -Wpedantic
  6. CFLAGS += -DDEBUG -O0 -ggdb -fno-inline
  7. else
  8. CFLAGS += -O3 -fno-stack-protector
  9. endif
  10. LDLIBS := -lircclient
  11. INSTALL_TARGET := /etc/init.d/hibot
  12. OUT := hibot
  13. SOURCE.d := source/
  14. SOURCE := main.c
  15. SOURCE := $(addprefix ${SOURCE.d}, ${SOURCE})
  16. HEADER := config.inc version.inc log.h bot.h syntax.h
  17. HEADER := $(addprefix ${SOURCE.d}, ${HEADER})
  18. ${OUT}: ${SOURCE} ${HEADER}
  19. ${CC} ${CFLAGS} -o $@ ${SOURCE} ${LDLIBS}
  20. run: ${OUT}
  21. ./${OUT} irc.rizon.net:6665 "#/g/test"
  22. test: ${OUT}
  23. ${WRAP} ${OUT} irc.rizon.net:6665 "#/g/test"
  24. install:
  25. m4 script/hibot.m4 > ${INSTALL_TARGET}
  26. chmod 755 ${INSTALL_TARGET}
  27. clean:
  28. -rm ${OUT}
  29. -rm ${INSTALL_TARGET}