From 160b3a382440a91fca1b4bbcde693b8b7c164aa3 Mon Sep 17 00:00:00 2001 From: Tom Harley Date: Tue, 29 Jan 2019 12:29:37 +0000 Subject: Add support for reading gamestates from json files Piles of cards can now be read from `.json` files using the `--game`/`-g` flag, although the solver doesn't seem to like them. Currently, cards mentioned in these files are all face-up, which means that they aren't particularly useful for building whole games and more just test cases. Also added command-line options parsing, including accepting randomisation seeds from the `--seed`/`-s` option. --- Makefile | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 8add398..14ed0a3 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,15 @@ -LINK.o = $(LINK.cc) -CXXFLAGS = -ggdb3 -Og -pedantic -Wall -Werror #-DNOTHREAD -LDFLAGS = -ggdb3 -Og -Lsolvitaire #-DNOTHREAD - +CXX = g++ +CXXFLAGS = -ggdb3 -O0 -Wpedantic -Wall -Werror #-DNOTHREAD OUTPUT_OPTION = -MMD -MP -o $@ -LDLIBS = -lsol -lpthread + +LINK.o = $(LINK.cc) +LDFLAGS = -Lsolvitaire -Lthpool -Ldocopt -Ljsmn +LDLIBS = -lpthread -lsol -lthpool -ldocopt -ljsmn TRGT = centre -SRC = metasol.cpp centre.cpp thpool/thpool.c -OBJ = metasol.o centre.o thpool/thpool.o -DEP = metasol.d centre.d thpool/thpool.d +SRC = metasol.cpp centre.cpp +OBJ = $(SRC:.cpp=.o) +DEP = $(SRC:.cpp=.d) .PHONY: default all run -- cgit v1.2.1