From 08097249f90b3ab3754f36d6bb5e9306b8e96440 Mon Sep 17 00:00:00 2001 From: Emil Date: Wed, 2 Aug 2023 08:52:59 -0600 Subject: [PATCH] Build system support for new files --- GNUmakefile | 8 ++++---- Makefile | 10 +++++----- build.sh | 2 +- {src => include}/creds_parser.h | 0 src/unity.c | 1 + 5 files changed, 11 insertions(+), 10 deletions(-) rename {src => include}/creds_parser.h (100%) diff --git a/GNUmakefile b/GNUmakefile index 0b67f58..b070e96 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -6,15 +6,15 @@ PROGN := probotic CC := cc CFLAGS := -std=c99 -Wall -Wextra -Wpedantic -CPPFLAGS := -I/usr/bin/ircclient/ +CPPFLAGS := -I/usr/bin/ircclient/ -Iinclude LDFLAGS := -lircclient SRC.DIR := src OBJ.DIR := $(PREFIX)/obj -# INC.DIR := include +INC.DIR := include -OBJ := $(addprefix $(OBJ.DIR)/,fetch.o main.o) -# HDR := +OBJ := $(addprefix $(OBJ.DIR)/,fetch.o main.o creds_parser.o) +HDR := creds_parser.h VPATH := $(INC.DIR) $(SRC.DIR) $(OBJ.DIR) diff --git a/Makefile b/Makefile index 442d562..55ad647 100644 --- a/Makefile +++ b/Makefile @@ -3,16 +3,16 @@ PROGN := probotic CC := cc CFLAGS := -std=c99 -Wall -Wextra -Wpedantic -CPPFLAGS := -I/usr/bin/ircclient/ -I /usr/include/libircclient/ +CPPFLAGS := -I/usr/bin/ircclient/ -Iinclude LDFLAGS := -lircclient SRC.DIR := src OBJ.DIR := obj -# INC.DIR := include +INC.DIR := include -SRC := fetch.c main.c -OBJ := fetch.o main.o -# HDR := +SRC := fetch.c main.c creds_parser.c +OBJ := fetch.o main.o creds_parser.o +HDR := creds_parser.h VPATH := ${INC.DIR}:${SRC.DIR}:${OBJ.DIR} diff --git a/build.sh b/build.sh index fe58f74..1a4e7a8 100755 --- a/build.sh +++ b/build.sh @@ -9,7 +9,7 @@ PREFIX=${PREFIX:-$DIR} CC=${CC-cc} CFLAGS='-std=c99 -Wall -Wextra -Wpedantic' -CPPFLAGS='-I/usr/bin/ircclient/' +CPPFLAGS='-I/usr/bin/ircclient/ -Iinclude' LDFLAGS='-lircclient' mkdir -p $PREFIX && echo "Made directory: $PREFIX" diff --git a/src/creds_parser.h b/include/creds_parser.h similarity index 100% rename from src/creds_parser.h rename to include/creds_parser.h diff --git a/src/unity.c b/src/unity.c index 42308d5..50238da 100644 --- a/src/unity.c +++ b/src/unity.c @@ -1,2 +1,3 @@ +#include "creds_parser.c" #include "fetch.c" #include "main.c"