summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJonathan Bradley <jcb@pikum.xyz>2024-12-05 15:05:04 -0500
committerJonathan Bradley <jcb@pikum.xyz>2024-12-05 15:06:10 -0500
commit74bf6a57c3c852d8b5237f2b5920556c63da1d79 (patch)
tree0379d5f64a6e09127cc137941d6452f2fbb0f98e /Makefile
parent42d967bb6a674fe025a2ad8455bc49a8b93b9d20 (diff)
pkarr: first-pass
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 19 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 681b36e..9d3c11f 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@
include config.mk
-.PHONY: pkmacros pkmem-types pkmem pkstr
+.PHONY: pkmacros pkmem-types pkmem pkstr pkarr
SRC = \
pkmacros.h \
@@ -11,6 +11,7 @@ SRC = \
pkmem.h \
pkstr.h \
pkev.h \
+ pkarr.h \
test/pkmacros.c \
test/pkmacros.cpp \
test/pkmem-types.c \
@@ -21,6 +22,7 @@ SRC = \
test/pkstr.cpp \
test/pkev.c \
test/pkev.cpp \
+ test/pkarr.cpp \
OBJ = $(SRC:%.c=.o)
PPOBJ = $(SRC:%.cpp=.so)
@@ -33,10 +35,12 @@ all: options .WAIT clean .WAIT \
pkmem \
pkstr \
pkev \
+ pkarr \
test-pkmem-types test-pkmem-types-cpp \
test-pkmem test-pkmem-cpp \
test-pkmacros test-pkmacros-cpp \
test-pkstr test-pkstr-cpp \
+ test-pkarr test-pkarr-cpp \
options:
@echo at-suite build options:
@@ -70,11 +74,14 @@ pkstr: pkmacros pkstr.gch pkstr.gchpp
pkev: pkev.gch pkev.gchpp
+pkarr: pkarr.gch pkarr.gchpp
+
build: pkmacros
build: pkmem-types
build: pkmem
build: pkstr
build: pkev
+build: pkarr
echo "#ifndef PK_SINGLE_HEADER_FILE_H\n#define PK_SINGLE_HEADER_FILE_H" > pk.h
cat pk.h.in \
pkmacros.h \
@@ -82,6 +89,7 @@ build: pkev
pkmem.h \
pkstr.h \
pkev.h \
+ pkarr.h \
>> pk.h
echo "#endif /* PK_SINGLE_HEADER_FILE_H */" >> pk.h
sed -i -r \
@@ -122,12 +130,19 @@ test-pkev: test/pkev.o
test-pkev-cpp: test/pkev.so
$(CXX) -g -O0 -std=c++23 $(CPPFLAGS) -o test/$@ $^ $(LDFLAGS)
-test: pkmacros pkmem-types pkmem pkstr pkev
+test-pkarr: test/pkarr.o
+ $(CC) -g -O0 -std=c2x $(CFLAGS) -o test/$@ $^ $(LDFLAGS)
+
+test-pkarr-cpp: test/pkarr.so
+ $(CXX) -g -O0 -std=c++23 $(CPPFLAGS) -o test/$@ $^ $(LDFLAGS)
+
+test: pkmacros pkmem-types pkmem pkstr pkev pkarr
test: test-pkmacros test-pkmacros-cpp
test: test-pkmem-types test-pkmem-types-cpp
test: test-pkmem test-pkmem-cpp
test: test-pkstr test-pkstr-cpp
test: test-pkev test-pkev-cpp
+test: test-pkarr test-pkarr-cpp
test:
@echo ""
./test/test-pkmacros ; echo Result: $$? "\n"
@@ -140,6 +155,8 @@ test:
./test/test-pkstr-cpp ; echo Result: $$? "\n"
./test/test-pkev ; echo Result: $$? "\n"
./test/test-pkev-cpp ; echo Result: $$? "\n"
+ ./test/test-pkarr ; echo Result: $$? "\n"
+ ./test/test-pkarr-cpp ; echo Result: $$? "\n"
clean:
rm -f *.plist *.gch *.gchpp *.o *.so test/*.o test/*.so test/test-*