# Makefile for the open-source release of adventure 2.5 # SPDX-FileCopyrightText: (C) Eric S. Raymond # SPDX-License-Identifier: BSD-2-Clause # To build with save/resume disabled, pass CFLAGS="-DADVENT_NOSAVE" # To build with auto-save/resume enabled, pass CFLAGS="-DADVENT_AUTOSAVE" VERS=$(shell sed -n MANIFEST @(ln -s . advent-$(VERS)) (tar -T MANIFEST -czvf advent-$(VERS).tar.gz) @(rm advent-$(VERS)) release: advent-$(VERS).tar.gz advent.html history.html hints.html notes.html shipper version=$(VERS) | sh -e -x refresh: advent.html notes.html history.html shipper -N -w version=$(VERS) | sh -e -x dist: advent-$(VERS).tar.gz linty: CCFLAGS += -W linty: CCFLAGS += -Wall linty: CCFLAGS += -Wextra linty: CCGLAGS += -Wpedantic linty: CCFLAGS += -Wundef linty: CCFLAGS += -Wstrict-prototypes linty: CCFLAGS += -Wmissing-prototypes linty: CCFLAGS += -Wmissing-declarations linty: CCFLAGS += -Wshadow linty: CCFLAGS += -Wnull-dereference linty: CCFLAGS += -Wjump-misses-init linty: CCFLAGS += -Wfloat-equal linty: CCFLAGS += -Wcast-align linty: CCFLAGS += -Wwrite-strings linty: CCFLAGS += -Waggregate-return linty: CCFLAGS += -Wcast-qual linty: CCFLAGS += -Wswitch-enum linty: CCFLAGS += -Wwrite-strings linty: CCFLAGS += -Wunreachable-code linty: CCFLAGS += -Winit-self linty: CCFLAGS += -Wpointer-arith linty: advent cheat # These seem to be more modern options for enabling coverage testing. # Documenting them here in case a future version bump disables --coverage. #debug: CCFLAGS += -ftest-coverage #debug: CCFLAGS += -fprofile-arcs debug: CCFLAGS += -O0 debug: CCFLAGS += --coverage debug: CCFLAGS += -ggdb debug: CCFLAGS += -U_FORTIFY_SOURCE debug: CCFLAGS += -fsanitize=address debug: CCFLAGS += -fsanitize=undefined debug: linty