# OVERRIDE ME # PROGN := probotic CC := cc CFLAGS := -std=c99 -Wall -Wextra -Wpedantic CPPFLAGS := -I/usr/bin/ircclient/ -I /usr/include/libircclient/ LDFLAGS := -lircclient SRC.DIR := src OBJ.DIR := obj # INC.DIR := include SRC := fetch.c main.c OBJ := fetch.o main.o # HDR := VPATH := ${INC.DIR}:${SRC.DIR}:${OBJ.DIR} .if "${DEBUG}" == "1" CFLAGS := ${CFLAGS} -Og -g3 .else CFLAGS := ${CFLAGS} -O3 -flto=auto -fomit-frame-pointer .endif .ifdef SAN CFLAGS := ${CFLAGS} -fsanitize=${SAN} .endif CPPFLAGS := ${CPPFLAGS} -DPROGN="\"${PROGN}\"" .c.o: ${CC} ${CFLAGS} ${CPPFLAGS} -c -o $@ $< ${PROGN}: ${OBJ.DIR} ${HDR} ${OBJ} ${CC} ${CFLAGS} ${CPPFLAGS} -o $@ ${OBJ} ${LDFLAGS} # include/config.h: include/config.mk.h # cp -f $< $@ ${OBJ.DIR}: mkdir -p $@ clean: ${RM} ${OBJ} ${PROGN}