diff options
| author | foswret <foswret@posteo.com> | 2025-12-11 23:40:02 -0600 |
|---|---|---|
| committer | foswret <foswret@posteo.com> | 2025-12-11 23:40:02 -0600 |
| commit | 5a0c5630e0bcc5e06beb856c666f7eaedd1c9559 (patch) | |
| tree | a2943c6ae7594f86e48515ef4da8d752323272d2 | |
| parent | de77826633fc128b915e999a9adf10f088b4d3f3 (diff) | |
updated Makefile, renamed output to calp and main.c/main.o to calp.c/calp.o
| -rw-r--r-- | .gitignore | 2 | ||||
| -rw-r--r-- | 0.pdf | bin | 5505 -> 5506 bytes | |||
| -rw-r--r-- | Makefile | 24 | ||||
| -rw-r--r-- | README.md | 16 | ||||
| -rw-r--r-- | src/calp.c (renamed from src/main.c) | 5 | ||||
| -rw-r--r-- | src/calp.o | bin | 0 -> 13272 bytes |
6 files changed, 32 insertions, 15 deletions
@@ -1,4 +1,4 @@ -output +calp 0.pdf main.o draw.o Binary files differ@@ -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 @@ -1,16 +1,18 @@ # Calp -`calp` attempts to generate clear and attractive calendars that can be printed. +calp attempts to generate dry and attractive calendars that can be printed. It is designed to be extensible and customizable for a wide range of calendar designs. # Dependencies - `cairo` -- `pkg-config` -# Build -- `make` +# Install +- `make clean install` + +# Uninstall +- `make uninstall` # Planned Features - Arguments (`getopts`) -- Holidays -- Moon Phases -- Month Art - Custom layout file parsing (config files) +- Holidays (.csv files) +- Month Art +- Moon Phases @@ -86,6 +86,7 @@ int main (void) { cairo_set_line_width (cr, 0.03); + clock_t begin = clock(); draw_calendar(cr, month_origin_x, month_origin_y, dim); draw_numbers(cr, month_origin_x, month_origin_y, dim, day.tm_wday, number_of_days); draw_month_name(cr, months[1], dim); @@ -93,5 +94,9 @@ int main (void) { /* Clean Up */ cairo_destroy(cr); cairo_surface_destroy(surface); + + clock_t end = clock(); + double time_spent = (double)(end - begin) / CLOCKS_PER_SEC; + printf("Execution Time: %.3fs\n", time_spent); return(0); } diff --git a/src/calp.o b/src/calp.o Binary files differnew file mode 100644 index 0000000..23e90f5 --- /dev/null +++ b/src/calp.o |
