From a0863e7f249e0a4eae8f71f8946cb90071fba985 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=BCnther?= Date: Fri, 28 Oct 2005 03:00:00 +0200 Subject: Initial version --- tools/Makefile | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 tools/Makefile (limited to 'tools/Makefile') diff --git a/tools/Makefile b/tools/Makefile new file mode 100644 index 0000000..cd02cfb --- /dev/null +++ b/tools/Makefile @@ -0,0 +1,41 @@ +# +# Sudoku: A plugin for the Video Disk Recorder +# +# See the README file for copyright information and how to reach the author. +# +# $Id: Makefile 11 2005-10-28 01:00:01Z tom $ + +# Define STATIC_LINK=1 to force static linking +#STATIC_LINK = 1 + +# Define WITH_TEST=1 to include test procedures +#WITH_TEST = 1 + +PROGRAM = sudoku_generator + +SRCS = ../puzzle.cpp ../generator.cpp ../solver.cpp ../backtrack.cpp + +VERSION = $(shell grep 'static const char\* VERSION *=' ../sudoku.cpp | \ + awk '{ print $$6 }' | sed -e 's/[";]//g') + +CXX ?= g++ +CXXFLAGS ?= -O2 -Wall -Woverloaded-virtual +DEFINES += -D_GNU_SOURCE -DVERSION=\"$(VERSION)\" + +ifdef STATIC_LINK + CXXFLAGS += -static +endif + +ifdef WITH_TEST + DEFINES += -DWITH_TEST +endif + +### Targets: + +all: $(PROGRAM) + +$(PROGRAM): $(PROGRAM).cpp $(SRCS) $(SRCS:%.cpp=%.h) + $(CXX) $(CXXFLAGS) $(DEFINES) $(INCLUDES) -o $@ $(PROGRAM).cpp $(SRCS) + +clean: + @-rm -f $(PROGRAM) core* *~ -- cgit v1.2.3