aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorfoswret <foswret@posteo.com>2025-12-11 23:40:02 -0600
committerfoswret <foswret@posteo.com>2025-12-11 23:40:02 -0600
commit5a0c5630e0bcc5e06beb856c666f7eaedd1c9559 (patch)
treea2943c6ae7594f86e48515ef4da8d752323272d2 /Makefile
parentde77826633fc128b915e999a9adf10f088b4d3f3 (diff)
updated Makefile, renamed output to calp and main.c/main.o to calp.c/calp.o
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 17 insertions, 7 deletions
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