X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=Makefile;h=8836d1ac0874891555bae267907dfa6b418cc1fa;hb=7bb2cda986e7357547ffff85268c765b53257111;hp=1b88b81d8e8398c7b693eaff3dca3688ff3e9763;hpb=24d7aeaf8a1dc13034884044139728045604fc37;p=open-adventure.git diff --git a/Makefile b/Makefile index 1b88b81..8836d1a 100644 --- a/Makefile +++ b/Makefile @@ -1,23 +1,132 @@ -# NOTE: This version of Adventure was developed by the author on private -# equipment, and has been ported to Sun for entertainment purposes only. -# The author (Don Woods) retains full rights to the work. +# Makefile for the open-source release of adventure 2.5 -OBJS=main.o init.o actions1.o actions2.o score.o misc.o datime.o +# To build with save/resume disabled, pass CCFLAGS="-D ADVENT_NOSAVE" + +VERS=$(shell sed -n MANIFEST + @(ln -s . advent-$(VERS)) + (tar -T MANIFEST -czvf advent-$(VERS).tar.gz) + @(rm advent-$(VERS)) -adventure: $(OBJS) - gcc -O $(DBX) -o adventure $(OBJS) +indent: + astyle -n -A3 --pad-header --min-conditional-indent=1 --pad-oper *.c -main.o: misc.h funcs.h +release: advent-$(VERS).tar.gz advent.html history.html hints.html notes.html + shipper version=$(VERS) | sh -e -x -init.o: misc.h main.h share.h funcs.h +refresh: advent.html notes.html history.html + shipper -N -w version=$(VERS) | sh -e -x -actions1.o: misc.h main.h share.h funcs.h +dist: advent-$(VERS).tar.gz -actions2.o: misc.h main.h share.h funcs.h +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 -score.o: misc.h main.h share.h +debug: CCFLAGS += -O0 +debug: CCFLAGS += --coverage +debug: CCFLAGS += -ggdb +debug: CCFLAGS += -U_FORTIFY_SOURCE +debug: CCFLAGS += -fsanitize=address +debug: CCFLAGS += -fsanitize=undefined +debug: linty -misc.o: misc.h main.h +CSUPPRESSIONS = --suppress=missingIncludeSystem --suppress=invalidscanf +cppcheck: + cppcheck -I. --template gcc --enable=all $(CSUPPRESSIONS) *.[ch]