This repository has been archived on 2024-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
probotic/Makefile
2023-08-06 20:51:57 -06:00

36 lines
717 B
Makefile

# note that this file does not properly handle options
PROGN:=probotic
CFLAGS:=-std=c99 -Wall -Wextra -Wpedantic -Wvla -Wshadow -Wundef
CPPFLAGS:=-I/usr/include/libircclient/ -Iinclude -D_GNU_SOURCE -DPROGN=\"${PROGN}\" -D_FORTIFY_SOURCE=2
LDLIBS:=-lircclient -lsqlite3
SRC := api.c irc.c main.c parse.c unity.c
HDR := api.h error.h irc.h irccolors.h parse.h stmt.h
ifeq (${DEBUG},1)
CFLAGS += -Og -ggdb
else
CFLAGS += -O3 -flto=auto -fomit-frame-pointer
endif
ifdef SAN
CFLAGS += -fsanitize=${SAN}
endif
ifeq (${NVULN},1)
CPPFLAGS += -DNO_VULN_COMMANDS
endif
${PROGN}: ${HDR} ${SRC}
${LINK.c} src/unity.c -o $@ ${LDLIBS}
# do nothing but update them...
$(SRC) $(HDR):
.PHONY: clean
clean:
-rm ${OBJ}