From 2b87a7aa16c4de35828af4c996cf7c3ab1b2ad59 Mon Sep 17 00:00:00 2001 From: foswret Date: Sat, 13 Dec 2025 14:57:58 -0600 Subject: after much pain, pango can now be compiled with the program correctly --- .gitignore | 5 +++-- Makefile | 12 ++++++------ README.md | 2 +- output.pdf | Bin 15883 -> 0 bytes src/calp.c | 3 +-- src/calp.o | Bin 14008 -> 0 bytes src/date.c | 3 +-- src/date.o | Bin 3112 -> 0 bytes 8 files changed, 12 insertions(+), 13 deletions(-) delete mode 100644 output.pdf delete mode 100644 src/calp.o delete mode 100644 src/date.o diff --git a/.gitignore b/.gitignore index acf1090..276db5a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ +TODO calp -output.pdf calp.o +date.o draw.o -TODO +output.pdf diff --git a/Makefile b/Makefile index cd8ef21..02f7eb0 100644 --- a/Makefile +++ b/Makefile @@ -5,15 +5,15 @@ DIR = src OBJS = $(DIR)/draw.o $(DIR)/calp.o $(DIR)/date.o .PHONY: clean all install -FLAGS = `pkg-config --cflags pangocairo` -LIBS = `pkg-config --libs pangocairo` +TARGET = calp -CFLAGS = -O2 -g -Wall -Werror -Wextra -Winit-self -Wuninitialized -pedantic +CFLAGS = `pkg-config --cflags pangocairo` -O2 -g -Wall -Werror -Wextra -Winit-self -Wuninitialized -pedantic +LFLAGS = `pkg-config --libs pangocairo` -all: calp +all: $(TARGET) -calp: $(OBJS) - $(CC) $(FLAGS) -o calp $(OBJS) $(LIBS) +$(TARGET): $(OBJS) + $(CC) $(CFLAGS) -o $(TARGET) $(OBJS) $(LFLAGS) clean: -rm -f $(OBJS) calp diff --git a/README.md b/README.md index 352eac3..7b801b3 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ calp attempts to generate dry and attractive calendars that can be printed. It i - `git` # Install -``` +```bash git clone https://git.foswret.com/calp cd calp make clean install diff --git a/output.pdf b/output.pdf deleted file mode 100644 index d3cecd2..0000000 Binary files a/output.pdf and /dev/null differ diff --git a/src/calp.c b/src/calp.c index 977d24e..6fbf9dc 100644 --- a/src/calp.c +++ b/src/calp.c @@ -11,7 +11,7 @@ #include #include -//#include +#include /* calp Libraries */ #include "color.h" @@ -21,7 +21,6 @@ // int main (int argc, char *argv[]) { int main (void) { // Dimension initialization - //PangoLayout *layout; int rows = 6; // Number of weeks in a month int columns = 7; // Number of days in a week int months_in_year = 12; diff --git a/src/calp.o b/src/calp.o deleted file mode 100644 index 7a15239..0000000 Binary files a/src/calp.o and /dev/null differ diff --git a/src/date.c b/src/date.c index 48642dd..8439703 100644 --- a/src/date.c +++ b/src/date.c @@ -1,4 +1,3 @@ -int isleap(int year) -{ +int isleap(int year) { return (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0); } diff --git a/src/date.o b/src/date.o deleted file mode 100644 index bc27b4b..0000000 Binary files a/src/date.o and /dev/null differ -- cgit v1.2.3