From 5a0c5630e0bcc5e06beb856c666f7eaedd1c9559 Mon Sep 17 00:00:00 2001 From: foswret Date: Thu, 11 Dec 2025 23:40:02 -0600 Subject: updated Makefile, renamed output to calp and main.c/main.o to calp.c/calp.o --- Makefile | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 67861a0..5e9411d 100644 --- a/Makefile +++ b/Makefile @@ -1,15 +1,25 @@ +VERSION = 0.0 +PREFIX = /usr/local CC = cc DIR = src -OBJS = $(DIR)/draw.o $(DIR)/main.o -CAIROI = `pkg-config --cflags -libs cairo cairo-pdf` -.PHONY: clean all +OBJS = $(DIR)/draw.o $(DIR)/calp.o +LIBS = -lcairo +.PHONY: clean all install CFLAGS = -O2 -g -Wall -Werror -Wextra -Winit-self -Wuninitialized -pedantic -all: output +all: calp -output: $(OBJS) - $(CC) $(CAIROI) -o output $(OBJS) +calp: $(OBJS) + $(CC) $(LIBS) -o calp $(OBJS) clean: - -rm -f $(OBJS) output + -rm -f $(OBJS) calp + +install: all + mkdir -p ${DESTDIR}${PREFIX}/bin + cp -f calp ${DESTDIR}${PREFIX}/bin + chmod 755 ${DESTDIR}${PREFIX}/bin/calp + +uninstall: + rm -f ${DESTDIR}${PREFIX}/bin/calp -- cgit v1.2.3