summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJonathan Bradley <jcb@pikum.xyz>2024-10-12 00:41:13 -0400
committerJonathan Bradley <jcb@pikum.xyz>2024-10-12 00:41:51 -0400
commit0385fb79f17dc7e3b4e266049c3db07bdd86dcd6 (patch)
tree126b0c2c85cf13b60e192e8820c23acfe4380f9e /Makefile
parent7889de050105a9fba827c46eaae767490c75177c (diff)
add PK_IMPL_ALL and break-up IMPL defines
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 17 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 4891508..553c6bc 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,9 @@
-# pkh - header-only library
+# pk.h
# See LICENSE file for copyright and license details.
include config.mk
-.PHONY: pkmem-types pkmem
+.PHONY: pkmacros pkmem-types pkmem pkstr
SRC = \
pkmacros.h \
@@ -29,8 +29,8 @@ all: options .WAIT clean .WAIT \
pkmem-types \
pkmem \
pkstr \
+ test-pkmem-types test-pkmem-types-cpp \
test-pkmem test-pkmem-cpp \
- test-types-pkmem test-types-pkmem-cpp \
test-pkmacros test-pkmacros-cpp \
test-pkstr test-pkstr-cpp \
@@ -64,6 +64,19 @@ pkmem: pkmem-types pkmem.gch pkmem.gchpp
pkstr: pkmacros pkstr.gch pkstr.gchpp
+build: pkmacros
+build: pkmem-types
+build: pkmem
+build: pkstr
+ @sed "1d; s/@@PK_VERSION@@/$(VERSION)/g; s/@@YEAR@@/`date -u +%%Y`/g;" pk.h.in > tmp
+ cat tmp \
+ pkmacros.h \
+ pkmem-types.h \
+ pkmem.h \
+ pkstr.h \
+ > pk.h
+ rm tmp
+
test-pkmacros: test/pkmacros.o
$(CC) -g -O0 -std=c2x $(CFLAGS) -o test/$@ $^ $(LDFLAGS)
@@ -88,7 +101,7 @@ test-pkstr: test/pkstr.o
test-pkstr-cpp: test/pkstr.so
$(CXX) -g -O0 -std=c++23 $(CPPFLAGS) -o test/$@ $^ $(LDFLAGS)
-test: pkmacros pkmem-types pkmem
+test: pkmacros pkmem-types pkmem pkstr
test: test-pkmacros test-pkmacros-cpp
test: test-pkmem-types test-pkmem-types-cpp
test: test-pkmem test-pkmem-cpp