aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMitchell Riedstra <mitch@riedstra.dev>2023-02-04 22:02:09 -0500
committerMitchell Riedstra <mitch@riedstra.dev>2023-02-04 22:23:21 -0500
commite6bb137aa20133589079d1378ecef8f7f1e9a84f (patch)
tree3b662ec202d3032b13ac85142532519e79929da7 /Makefile
parentcdda89a3c76fef80f29951389df88ed23d052d52 (diff)
downloadpm-e6bb137aa20133589079d1378ecef8f7f1e9a84f.tar.gz
pm-e6bb137aa20133589079d1378ecef8f7f1e9a84f.tar.xz
Switch formatting from AWK to a C program.
Due mostly to poor performance, calling out to the shell for time formatting quickly degrades in performance with a large list, this solves that problem. Yes, `gawk` has strftime, no, I don't want to use gawk.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 7 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 2da16ac..5aeb748 100644
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,13 @@
PREFIX ?= /usr/local
-all: strftime
+CC ?= cc
+CFLAGS ?= -D_DEFAULT_SOURCE -std=c99 -pedantic -Wall -O2 -s
-install: strftime
- install -m 755 strftime $(PREFIX)/bin/strftime
+all: pm-fmtdb
+
+install: pm-fmtdb
+ install -m 755 pm-fmtdb $(PREFIX)/bin/pm-fmtdb
install -m 755 pm $(PREFIX)/bin/pm
clean:
- rm -f strftime
+ rm -f pm-fmtdb