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

45 lines
843 B
Makefile
Raw Normal View History

# OVERRIDE ME #
PROGN := probotic
CC := cc
CFLAGS := -std=c99 -Wall -Wextra -Wpedantic
2023-08-02 10:52:59 -04:00
CPPFLAGS := -I/usr/bin/ircclient/ -Iinclude
LDFLAGS := -lircclient
SRC.DIR := src
2023-08-02 10:29:19 -04:00
OBJ.DIR := obj
2023-08-02 10:52:59 -04:00
INC.DIR := include
2023-08-02 10:52:59 -04:00
SRC := fetch.c main.c creds_parser.c
OBJ := fetch.o main.o creds_parser.o
2023-08-02 11:09:34 -04:00
HDR := config.h utils.h creds_parser.h
2023-08-02 10:29:19 -04:00
VPATH := ${INC.DIR}:${SRC.DIR}:${OBJ.DIR}
.if "${DEBUG}" == "1"
CFLAGS := ${CFLAGS} -Og -g3
.else
CFLAGS := ${CFLAGS} -O3 -flto=auto -fomit-frame-pointer
.endif
2023-08-02 10:29:19 -04:00
.ifdef SAN
CFLAGS := ${CFLAGS} -fsanitize=${SAN}
.endif
2023-08-02 10:29:19 -04:00
CPPFLAGS := ${CPPFLAGS} -DPROGN="\"${PROGN}\""
2023-08-02 10:41:54 -04:00
.c.o:
${CC} ${CFLAGS} ${CPPFLAGS} -c -o $@ $<
2023-08-02 10:41:54 -04:00
${PROGN}: ${OBJ.DIR} ${HDR} ${OBJ}
2023-08-02 10:29:19 -04:00
${CC} ${CFLAGS} ${CPPFLAGS} -o $@ ${OBJ} ${LDFLAGS}
2023-08-02 11:09:34 -04:00
include/config.h: include/config.mk.h
cp -f $< $@
2023-08-02 10:41:54 -04:00
${OBJ.DIR}:
mkdir -p $@
clean:
2023-08-02 10:29:19 -04:00
${RM} ${OBJ} ${PROGN}