Probiotics (in bot form) for programming.
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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

53 lines
1.0KB

  1. # note that this file does not properly handle options
  2. PROGN:=probotic
  3. CFLAGS:=-std=c99 -Wall -Wextra -Wpedantic -Wvla -Wshadow -Wundef
  4. CPPFLAGS:=-I./lib/libircclient/include/ -Iinclude -D_GNU_SOURCE -DPROGN=\"${PROGN}\" -D_FORTIFY_SOURCE=2
  5. LDLIBS:=-lsqlite3
  6. LIB:=./lib/libircclient/src/libircclient.o
  7. SRC := api.c irc.c main.c parse.c unity.c
  8. HDR := config.h api.h error.h irc.h irccolors.h parse.h stmt.h
  9. VPATH := src include
  10. ifeq (${DEBUG},1)
  11. CFLAGS += -Og -ggdb
  12. else
  13. CFLAGS += -O3 -flto=auto -fomit-frame-pointer
  14. endif
  15. ifdef SAN
  16. CFLAGS += -fsanitize=${SAN}
  17. endif
  18. ifeq (${NO_VULN},1)
  19. CPPFLAGS += -DNO_VULN_COMMANDS
  20. endif
  21. ifeq (${ENABLE_SSL},1)
  22. LDLIBS += -lssl -lcrypto
  23. CPPFLAGS += -DIRC_SSL_SUPPORT
  24. endif
  25. all: include/config.h ${PROGN}
  26. ${PROGN}: ${HDR} ${SRC}
  27. ${LINK.c} -pipe ${LIB} src/unity.c -o $@ ${LDLIBS}
  28. # do nothing but update them...
  29. ${SRC} ${HDR}:
  30. submodules:
  31. git submodule update --init --recursive
  32. include/config.h: config.mk.h
  33. cp -f $< $@
  34. clean:
  35. -rm ${OBJ}
  36. .PHONY: all submodules clean