X-Git-Url: https://jxself.org/git/?p=open-adventure.git;a=blobdiff_plain;f=Makefile;h=55e4ace2f51c31c4f0a77f1ca3edb95b074fe743;hp=62a4ee4fc91dd1bb775f6af2cebaa49b6f8ed2d4;hb=0f3d3f735f4b2e78f3891b5f779a22259c17fa81;hpb=d844c2a3913e1c7d331b080a4a09631e515d9364 diff --git a/Makefile b/Makefile index 62a4ee4..55e4ace 100644 --- a/Makefile +++ b/Makefile @@ -21,11 +21,15 @@ # # If you are using MacPorts on OS X: # port install py3{5,6}-yaml as appropriate for your Python 3 version. +# +# To build with save/resume disabled, pass CCFLAGS="-D ADVENT_NOSAVE" + +.PHONY: debug indent release refresh dist linty html clean VERS=1.0 CC?=gcc -CCFLAGS+=-std=c99 -D _DEFAULT_SOURCE -Wpedantic +CCFLAGS+=-std=c99 -D _DEFAULT_SOURCE -Wpedantic -O2 LIBS= UNAME_S := $(shell uname -s) ifeq ($(UNAME_S),Linux) @@ -116,8 +120,25 @@ refresh: advent.html dist: advent-$(VERS).tar.gz -linty: CCFLAGS += -W -Wall -Wextra -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wshadow -Wfloat-equal -Wcast-align -Wwrite-strings -Waggregate-return -Wcast-qual -Wswitch-enum -Wwrite-strings -Wunreachable-code -Winit-self -Wpointer-arith -O2 +linty: CCFLAGS += -W +linty: CCFLAGS += -Wall +linty: CCFLAGS += -Wextra +linty: CCFLAGS += -Wundef +linty: CCFLAGS += -Wstrict-prototypes +linty: CCFLAGS += -Wmissing-prototypes +linty: CCFLAGS += -Wmissing-declarations +linty: CCFLAGS += -Wshadow +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 -debug: CCFLAGS += -O0 --coverage -g -debug: advent +debug: CCFLAGS += -O0 --coverage -ggdb +debug: linty