summaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 12 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index ffa5f04..491938d 100644
--- a/Makefile
+++ b/Makefile
@@ -38,13 +38,14 @@ VERSION = 1.1.0
CCDIR = /usr/lpp/IBM/cnw/v2r2/openxl/bin
CC = $(CCDIR)/ibm-clang
CPPFLAGS = -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=200809L -D_ALL_SOURCE \
- -D_EXT -D_OPEN_SYS -D_OPEN_SYS_FILE_EXT \
+ -D_EXT -D_OPEN_SYS -D_OPEN_SYS_FILE_EXT=1 \
-DWHOSON_VERSION=\"$(VERSION)\"
CFLAGS = -std=c23 -O3 -m64 -mzos-target=zosv2r5 -fzos-le-char-mode=ascii \
- -Wall -Wextra -Wpedantic -Wshadow -Wconversion
+ -Wall -Wextra -Wpedantic -Wshadow -Wconversion \
+ -Wstrict-prototypes -Wmissing-prototypes
CEEOPTS = HEAPCHK(ON,1,32),RPTSTG(ON),FILETAG(AUTOCVT,AUTOTAG),POSIX(ON)
-.PHONY: all install check list clean
+.PHONY: all install check list format tidy clean
all: whoson
@@ -66,6 +67,14 @@ install: whoson
cp whoson $(BINDIR)/whoson
chmod 755 $(BINDIR)/whoson
+# The two gates that run off-platform, named as the standards document asks.
+# tidy needs the z/OS headers, so it only runs on z/OS.
+format:
+ clang-format -i whoson.c
+
+tidy:
+ clang-tidy whoson.c -- $(CPPFLAGS) -std=c23
+
check: whoson
_CEE_RUNOPTS="$(CEEOPTS)" ./whoson