aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar alecdwm 2015-08-16 12:26:13 +1000
committerGravatar alecdwm 2015-08-16 12:26:13 +1000
commit25502709e3edf51de420a04bcedfec3a940f2d71 (patch)
tree581520301144b04a58520b92c98cfc65f767870d
parent300b8a6734f52bd25bfe542d8e4405e122e81b51 (diff)
Changed build system from netbeans to generic makefile
-rw-r--r--Makefile324
-rw-r--r--nbproject/Makefile-Debug.mk96
-rw-r--r--nbproject/Makefile-Release.mk96
-rw-r--r--nbproject/Makefile-Win64.mk96
-rw-r--r--nbproject/Makefile-impl.mk133
-rw-r--r--nbproject/Makefile-variables.mk43
-rw-r--r--nbproject/Package-Debug.bash76
-rw-r--r--nbproject/Package-Release.bash76
-rw-r--r--nbproject/Package-Win64.bash76
-rw-r--r--nbproject/configurations.xml123
-rw-r--r--nbproject/project.xml32
11 files changed, 197 insertions, 974 deletions
diff --git a/Makefile b/Makefile
index 05de621..e265ff4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,128 +1,198 @@
-#
-# There exist several targets which are by default empty and which can be
-# used for execution of your targets. These targets are usually executed
-# before and after some main targets. They are:
-#
-# .build-pre: called before 'build' target
-# .build-post: called after 'build' target
-# .clean-pre: called before 'clean' target
-# .clean-post: called after 'clean' target
-# .clobber-pre: called before 'clobber' target
-# .clobber-post: called after 'clobber' target
-# .all-pre: called before 'all' target
-# .all-post: called after 'all' target
-# .help-pre: called before 'help' target
-# .help-post: called after 'help' target
-#
-# Targets beginning with '.' are not intended to be called on their own.
-#
-# Main targets can be executed directly, and they are:
-#
-# build build a specific configuration
-# clean remove built files from a configuration
-# clobber remove all built files
-# all build all configurations
-# help print help mesage
-#
-# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and
-# .help-impl are implemented in nbproject/makefile-impl.mk.
-#
-# Available make variables:
-#
-# CND_BASEDIR base directory for relative paths
-# CND_DISTDIR default top distribution directory (build artifacts)
-# CND_BUILDDIR default top build directory (object files, ...)
-# CONF name of current configuration
-# CND_PLATFORM_${CONF} platform name (current configuration)
-# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration)
-# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration)
-# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration)
-# CND_PACKAGE_DIR_${CONF} directory of package (current configuration)
-# CND_PACKAGE_NAME_${CONF} name of package (current configuration)
-# CND_PACKAGE_PATH_${CONF} path to package (current configuration)
-#
-# NOCDDL
+#### PROJECT SETTINGS ####
+# The name of the executable to be created
+BIN_NAME := CppTicTacToe
+# Compiler used
+CXX ?= g++
+# Extension of source files used in the project
+SRC_EXT = cpp
+# Path to the source directory, relative to the makefile
+SRC_PATH = .
+# Space-separated pkg-config libraries used by this project
+LIBS =
+# General compiler flags
+COMPILE_FLAGS = -std=c++11 -Wall -Wextra -g
+# Additional release-specific flags
+RCOMPILE_FLAGS = -D NDEBUG
+# Additional debug-specific flags
+DCOMPILE_FLAGS = -D DEBUG
+# Add additional include paths
+INCLUDES = -I $(SRC_PATH)/
+# General linker settings
+LINK_FLAGS =
+# Additional release-specific linker settings
+RLINK_FLAGS =
+# Additional debug-specific linker settings
+DLINK_FLAGS =
+# Destination directory, like a jail or mounted system
+DESTDIR = /
+# Install path (bin/ is appended automatically)
+INSTALL_PREFIX = usr/local
+#### END PROJECT SETTINGS ####
+
+# Generally should not need to edit below this line
+
+# Shell used in this makefile
+# bash is used for 'echo -en'
+SHELL = /bin/bash
+# Clear built-in rules
+.SUFFIXES:
+# Programs for installation
+INSTALL = install
+INSTALL_PROGRAM = $(INSTALL)
+INSTALL_DATA = $(INSTALL) -m 644
+
+# Append pkg-config specific libraries if need be
+ifneq ($(LIBS),)
+ COMPILE_FLAGS += $(shell pkg-config --cflags $(LIBS))
+ LINK_FLAGS += $(shell pkg-config --libs $(LIBS))
+endif
+
+# Verbose option, to output compile and link commands
+export V := false
+export CMD_PREFIX := @
+ifeq ($(V),true)
+ CMD_PREFIX :=
+endif
+
+# Combine compiler and linker flags
+release: export CXXFLAGS := $(CXXFLAGS) $(COMPILE_FLAGS) $(RCOMPILE_FLAGS)
+release: export LDFLAGS := $(LDFLAGS) $(LINK_FLAGS) $(RLINK_FLAGS)
+debug: export CXXFLAGS := $(CXXFLAGS) $(COMPILE_FLAGS) $(DCOMPILE_FLAGS)
+debug: export LDFLAGS := $(LDFLAGS) $(LINK_FLAGS) $(DLINK_FLAGS)
+
+# Build and output paths
+release: export BUILD_PATH := build/release
+release: export BIN_PATH := bin/release
+debug: export BUILD_PATH := build/debug
+debug: export BIN_PATH := bin/debug
+install: export BIN_PATH := bin/release
+
+# Find all source files in the source directory, sorted by most
+# recently modified
+SOURCES = $(shell find $(SRC_PATH)/ -name '*.$(SRC_EXT)' -printf '%T@\t%p\n' \
+ | sort -k 1nr | cut -f2-)
+# fallback in case the above fails
+rwildcard = $(foreach d, $(wildcard $1*), $(call rwildcard,$d/,$2) \
+ $(filter $(subst *,%,$2), $d))
+ifeq ($(SOURCES),)
+ SOURCES := $(call rwildcard, $(SRC_PATH)/, *.$(SRC_EXT))
+endif
+
+# Set the object file names, with the source directory stripped
+# from the path, and the build path prepended in its place
+OBJECTS = $(SOURCES:$(SRC_PATH)/%.$(SRC_EXT)=$(BUILD_PATH)/%.o)
+# Set the dependency files that will be used to add header dependencies
+DEPS = $(OBJECTS:.o=.d)
+
+# Macros for timing compilation
+TIME_FILE = $(dir $@).$(notdir $@)_time
+START_TIME = date '+%s' > $(TIME_FILE)
+END_TIME = read st < $(TIME_FILE) ; \
+ $(RM) $(TIME_FILE) ; \
+ st=$$((`date '+%s'` - $$st - 86400)) ; \
+ echo `date -u -d @$$st '+%H:%M:%S'`
+
+# Version macros
+# Comment/remove this section to remove versioning
+USE_VERSION := false
+# If this isn't a git repo or the repo has no tags, git describe will return non-zero
+ifeq ($(shell git describe > /dev/null 2>&1 ; echo $$?), 0)
+ USE_VERSION := true
+ VERSION := $(shell git describe --tags --long --dirty --always | \
+ sed 's/v\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)-\?.*-\([0-9]*\)-\(.*\)/\1 \2 \3 \4 \5/g')
+ VERSION_MAJOR := $(word 1, $(VERSION))
+ VERSION_MINOR := $(word 2, $(VERSION))
+ VERSION_PATCH := $(word 3, $(VERSION))
+ VERSION_REVISION := $(word 4, $(VERSION))
+ VERSION_HASH := $(word 5, $(VERSION))
+ VERSION_STRING := \
+ "$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH).$(VERSION_REVISION)-$(VERSION_HASH)"
+ override CXXFLAGS := $(CXXFLAGS) \
+ -D VERSION_MAJOR=$(VERSION_MAJOR) \
+ -D VERSION_MINOR=$(VERSION_MINOR) \
+ -D VERSION_PATCH=$(VERSION_PATCH) \
+ -D VERSION_REVISION=$(VERSION_REVISION) \
+ -D VERSION_HASH=\"$(VERSION_HASH)\"
+endif
+
+# Standard, non-optimized release build
+.PHONY: release
+release: dirs
+ifeq ($(USE_VERSION), true)
+ @echo "Beginning release build v$(VERSION_STRING)"
+else
+ @echo "Beginning release build"
+endif
+ @$(START_TIME)
+ @$(MAKE) all --no-print-directory
+ @echo -n "Total build time: "
+ @$(END_TIME)
+
+# Debug build for gdb debugging
+.PHONY: debug
+debug: dirs
+ifeq ($(USE_VERSION), true)
+ @echo "Beginning debug build v$(VERSION_STRING)"
+else
+ @echo "Beginning debug build"
+endif
+ @$(START_TIME)
+ @$(MAKE) all --no-print-directory
+ @echo -n "Total build time: "
+ @$(END_TIME)
+
+# Create the directories used in the build
+.PHONY: dirs
+dirs:
+ @echo "Creating directories"
+ @mkdir -p $(dir $(OBJECTS))
+ @mkdir -p $(BIN_PATH)
+
+# Installs to the set path
+.PHONY: install
+install:
+ @echo "Installing to $(DESTDIR)$(INSTALL_PREFIX)/bin"
+ @$(INSTALL_PROGRAM) $(BIN_PATH)/$(BIN_NAME) $(DESTDIR)$(INSTALL_PREFIX)/bin
+
+# Uninstalls the program
+.PHONY: uninstall
+uninstall:
+ @echo "Removing $(DESTDIR)$(INSTALL_PREFIX)/bin/$(BIN_NAME)"
+ @$(RM) $(DESTDIR)$(INSTALL_PREFIX)/bin/$(BIN_NAME)
+
+# Removes all build files
+.PHONY: clean
+clean:
+ @echo "Deleting $(BIN_NAME) symlink"
+ @$(RM) $(BIN_NAME)
+ @echo "Deleting directories"
+ @$(RM) -r build
+ @$(RM) -r bin
+
+# Main rule, checks the executable and symlinks to the output
+all: $(BIN_PATH)/$(BIN_NAME)
+ @echo "Making symlink: $(BIN_NAME) -> $<"
+ @$(RM) $(BIN_NAME)
+ @ln -s $(BIN_PATH)/$(BIN_NAME) $(BIN_NAME)
+
+# Link the executable
+$(BIN_PATH)/$(BIN_NAME): $(OBJECTS)
+ @echo "Linking: $@"
+ @$(START_TIME)
+ $(CMD_PREFIX)$(CXX) $(OBJECTS) $(LDFLAGS) -o $@
+ @echo -en "\t Link time: "
+ @$(END_TIME)
+
+# Add dependency files, if they exist
+-include $(DEPS)
+
+# Source file rules
+# After the first compilation they will be joined with the rules from the
+# dependency files to provide header dependencies
+$(BUILD_PATH)/%.o: $(SRC_PATH)/%.$(SRC_EXT)
+ @echo "Compiling: $< -> $@"
+ @$(START_TIME)
+ $(CMD_PREFIX)$(CXX) $(CXXFLAGS) $(INCLUDES) -MP -MMD -c $< -o $@
+ @echo -en "\t Compile time: "
+ @$(END_TIME)
-
-# Environment
-MKDIR=mkdir
-CP=cp
-CCADMIN=CCadmin
-
-
-# build
-build: .build-post
-
-.build-pre:
-# Add your pre 'build' code here...
-
-.build-post: .build-impl
-# Add your post 'build' code here...
-
-
-# clean
-clean: .clean-post
-
-.clean-pre:
-# Add your pre 'clean' code here...
-
-.clean-post: .clean-impl
-# Add your post 'clean' code here...
-
-
-# clobber
-clobber: .clobber-post
-
-.clobber-pre:
-# Add your pre 'clobber' code here...
-
-.clobber-post: .clobber-impl
-# Add your post 'clobber' code here...
-
-
-# all
-all: .all-post
-
-.all-pre:
-# Add your pre 'all' code here...
-
-.all-post: .all-impl
-# Add your post 'all' code here...
-
-
-# build tests
-build-tests: .build-tests-post
-
-.build-tests-pre:
-# Add your pre 'build-tests' code here...
-
-.build-tests-post: .build-tests-impl
-# Add your post 'build-tests' code here...
-
-
-# run tests
-test: .test-post
-
-.test-pre: build-tests
-# Add your pre 'test' code here...
-
-.test-post: .test-impl
-# Add your post 'test' code here...
-
-
-# help
-help: .help-post
-
-.help-pre:
-# Add your pre 'help' code here...
-
-.help-post: .help-impl
-# Add your post 'help' code here...
-
-
-
-# include project implementation makefile
-include nbproject/Makefile-impl.mk
-
-# include project make variables
-include nbproject/Makefile-variables.mk
diff --git a/nbproject/Makefile-Debug.mk b/nbproject/Makefile-Debug.mk
deleted file mode 100644
index ad88a54..0000000
--- a/nbproject/Makefile-Debug.mk
+++ /dev/null
@@ -1,96 +0,0 @@
-#
-# Generated Makefile - do not edit!
-#
-# Edit the Makefile in the project folder instead (../Makefile). Each target
-# has a -pre and a -post target defined where you can add customized code.
-#
-# This makefile implements configuration specific macros and targets.
-
-
-# Environment
-MKDIR=mkdir
-CP=cp
-GREP=grep
-NM=nm
-CCADMIN=CCadmin
-RANLIB=ranlib
-CC=gcc
-CCC=g++
-CXX=g++
-FC=gfortran
-AS=as
-
-# Macros
-CND_PLATFORM=GNU-Linux-x86
-CND_DLIB_EXT=so
-CND_CONF=Debug
-CND_DISTDIR=dist
-CND_BUILDDIR=build
-
-# Include project Makefile
-include Makefile
-
-# Object Directory
-OBJECTDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}
-
-# Object Files
-OBJECTFILES= \
- ${OBJECTDIR}/Gameboard.o \
- ${OBJECTDIR}/Player.o \
- ${OBJECTDIR}/main.o
-
-
-# C Compiler Flags
-CFLAGS=
-
-# CC Compiler Flags
-CCFLAGS=
-CXXFLAGS=
-
-# Fortran Compiler Flags
-FFLAGS=
-
-# Assembler Flags
-ASFLAGS=
-
-# Link Libraries and Options
-LDLIBSOPTIONS=
-
-# Build Targets
-.build-conf: ${BUILD_SUBPROJECTS}
- "${MAKE}" -f nbproject/Makefile-${CND_CONF}.mk ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cpptictactoe
-
-${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cpptictactoe: ${OBJECTFILES}
- ${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}
- ${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cpptictactoe ${OBJECTFILES} ${LDLIBSOPTIONS}
-
-${OBJECTDIR}/Gameboard.o: Gameboard.cpp
- ${MKDIR} -p ${OBJECTDIR}
- ${RM} "$@.d"
- $(COMPILE.cc) -g -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/Gameboard.o Gameboard.cpp
-
-${OBJECTDIR}/Player.o: Player.cpp
- ${MKDIR} -p ${OBJECTDIR}
- ${RM} "$@.d"
- $(COMPILE.cc) -g -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/Player.o Player.cpp
-
-${OBJECTDIR}/main.o: main.cpp
- ${MKDIR} -p ${OBJECTDIR}
- ${RM} "$@.d"
- $(COMPILE.cc) -g -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/main.o main.cpp
-
-# Subprojects
-.build-subprojects:
-
-# Clean Targets
-.clean-conf: ${CLEAN_SUBPROJECTS}
- ${RM} -r ${CND_BUILDDIR}/${CND_CONF}
- ${RM} ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cpptictactoe
-
-# Subprojects
-.clean-subprojects:
-
-# Enable dependency checking
-.dep.inc: .depcheck-impl
-
-include .dep.inc
diff --git a/nbproject/Makefile-Release.mk b/nbproject/Makefile-Release.mk
deleted file mode 100644
index f7c8e12..0000000
--- a/nbproject/Makefile-Release.mk
+++ /dev/null
@@ -1,96 +0,0 @@
-#
-# Generated Makefile - do not edit!
-#
-# Edit the Makefile in the project folder instead (../Makefile). Each target
-# has a -pre and a -post target defined where you can add customized code.
-#
-# This makefile implements configuration specific macros and targets.
-
-
-# Environment
-MKDIR=mkdir
-CP=cp
-GREP=grep
-NM=nm
-CCADMIN=CCadmin
-RANLIB=ranlib
-CC=gcc
-CCC=g++
-CXX=g++
-FC=gfortran
-AS=as
-
-# Macros
-CND_PLATFORM=GNU-Linux-x86
-CND_DLIB_EXT=so
-CND_CONF=Release
-CND_DISTDIR=dist
-CND_BUILDDIR=build
-
-# Include project Makefile
-include Makefile
-
-# Object Directory
-OBJECTDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}
-
-# Object Files
-OBJECTFILES= \
- ${OBJECTDIR}/Gameboard.o \
- ${OBJECTDIR}/Player.o \
- ${OBJECTDIR}/main.o
-
-
-# C Compiler Flags
-CFLAGS=
-
-# CC Compiler Flags
-CCFLAGS=
-CXXFLAGS=
-
-# Fortran Compiler Flags
-FFLAGS=
-
-# Assembler Flags
-ASFLAGS=
-
-# Link Libraries and Options
-LDLIBSOPTIONS=
-
-# Build Targets
-.build-conf: ${BUILD_SUBPROJECTS}
- "${MAKE}" -f nbproject/Makefile-${CND_CONF}.mk ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cpptictactoe
-
-${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cpptictactoe: ${OBJECTFILES}
- ${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}
- ${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cpptictactoe ${OBJECTFILES} ${LDLIBSOPTIONS}
-
-${OBJECTDIR}/Gameboard.o: Gameboard.cpp
- ${MKDIR} -p ${OBJECTDIR}
- ${RM} "$@.d"
- $(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/Gameboard.o Gameboard.cpp
-
-${OBJECTDIR}/Player.o: Player.cpp
- ${MKDIR} -p ${OBJECTDIR}
- ${RM} "$@.d"
- $(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/Player.o Player.cpp
-
-${OBJECTDIR}/main.o: main.cpp
- ${MKDIR} -p ${OBJECTDIR}
- ${RM} "$@.d"
- $(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/main.o main.cpp
-
-# Subprojects
-.build-subprojects:
-
-# Clean Targets
-.clean-conf: ${CLEAN_SUBPROJECTS}
- ${RM} -r ${CND_BUILDDIR}/${CND_CONF}
- ${RM} ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cpptictactoe
-
-# Subprojects
-.clean-subprojects:
-
-# Enable dependency checking
-.dep.inc: .depcheck-impl
-
-include .dep.inc
diff --git a/nbproject/Makefile-Win64.mk b/nbproject/Makefile-Win64.mk
deleted file mode 100644
index ed67a69..0000000
--- a/nbproject/Makefile-Win64.mk
+++ /dev/null
@@ -1,96 +0,0 @@
-#
-# Generated Makefile - do not edit!
-#
-# Edit the Makefile in the project folder instead (../Makefile). Each target
-# has a -pre and a -post target defined where you can add customized code.
-#
-# This makefile implements configuration specific macros and targets.
-
-
-# Environment
-MKDIR=mkdir
-CP=cp
-GREP=grep
-NM=nm
-CCADMIN=CCadmin
-RANLIB=ranlib
-CC=gcc
-CCC=x86_64-w64-mingw32-g++
-CXX=x86_64-w64-mingw32-g++
-FC=gfortran
-AS=as
-
-# Macros
-CND_PLATFORM=GNU-Linux-x86
-CND_DLIB_EXT=so
-CND_CONF=Win64
-CND_DISTDIR=dist
-CND_BUILDDIR=build
-
-# Include project Makefile
-include Makefile
-
-# Object Directory
-OBJECTDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}
-
-# Object Files
-OBJECTFILES= \
- ${OBJECTDIR}/Gameboard.o \
- ${OBJECTDIR}/Player.o \
- ${OBJECTDIR}/main.o
-
-
-# C Compiler Flags
-CFLAGS=
-
-# CC Compiler Flags
-CCFLAGS=
-CXXFLAGS=
-
-# Fortran Compiler Flags
-FFLAGS=
-
-# Assembler Flags
-ASFLAGS=
-
-# Link Libraries and Options
-LDLIBSOPTIONS=
-
-# Build Targets
-.build-conf: ${BUILD_SUBPROJECTS}
- "${MAKE}" -f nbproject/Makefile-${CND_CONF}.mk ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cpptictactoe.exe
-
-${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cpptictactoe.exe: ${OBJECTFILES}
- ${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}
- x86_64-w64-mingw32-g++ -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cpptictactoe.exe ${OBJECTFILES} ${LDLIBSOPTIONS}
-
-${OBJECTDIR}/Gameboard.o: Gameboard.cpp
- ${MKDIR} -p ${OBJECTDIR}
- ${RM} "$@.d"
- $(COMPILE.cc) -g -std=c++11 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/Gameboard.o Gameboard.cpp
-
-${OBJECTDIR}/Player.o: Player.cpp
- ${MKDIR} -p ${OBJECTDIR}
- ${RM} "$@.d"
- $(COMPILE.cc) -g -std=c++11 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/Player.o Player.cpp
-
-${OBJECTDIR}/main.o: main.cpp
- ${MKDIR} -p ${OBJECTDIR}
- ${RM} "$@.d"
- $(COMPILE.cc) -g -std=c++11 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/main.o main.cpp
-
-# Subprojects
-.build-subprojects:
-
-# Clean Targets
-.clean-conf: ${CLEAN_SUBPROJECTS}
- ${RM} -r ${CND_BUILDDIR}/${CND_CONF}
- ${RM} ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cpptictactoe.exe
-
-# Subprojects
-.clean-subprojects:
-
-# Enable dependency checking
-.dep.inc: .depcheck-impl
-
-include .dep.inc
diff --git a/nbproject/Makefile-impl.mk b/nbproject/Makefile-impl.mk
deleted file mode 100644
index 0afa4a7..0000000
--- a/nbproject/Makefile-impl.mk
+++ /dev/null
@@ -1,133 +0,0 @@
-#
-# Generated Makefile - do not edit!
-#
-# Edit the Makefile in the project folder instead (../Makefile). Each target
-# has a pre- and a post- target defined where you can add customization code.
-#
-# This makefile implements macros and targets common to all configurations.
-#
-# NOCDDL
-
-
-# Building and Cleaning subprojects are done by default, but can be controlled with the SUB
-# macro. If SUB=no, subprojects will not be built or cleaned. The following macro
-# statements set BUILD_SUB-CONF and CLEAN_SUB-CONF to .build-reqprojects-conf
-# and .clean-reqprojects-conf unless SUB has the value 'no'
-SUB_no=NO
-SUBPROJECTS=${SUB_${SUB}}
-BUILD_SUBPROJECTS_=.build-subprojects
-BUILD_SUBPROJECTS_NO=
-BUILD_SUBPROJECTS=${BUILD_SUBPROJECTS_${SUBPROJECTS}}
-CLEAN_SUBPROJECTS_=.clean-subprojects
-CLEAN_SUBPROJECTS_NO=
-CLEAN_SUBPROJECTS=${CLEAN_SUBPROJECTS_${SUBPROJECTS}}
-
-
-# Project Name
-PROJECTNAME=CppTicTacToe
-
-# Active Configuration
-DEFAULTCONF=Debug
-CONF=${DEFAULTCONF}
-
-# All Configurations
-ALLCONFS=Debug Release Win64
-
-
-# build
-.build-impl: .build-pre .validate-impl .depcheck-impl
- @#echo "=> Running $@... Configuration=$(CONF)"
- "${MAKE}" -f nbproject/Makefile-${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .build-conf
-
-
-# clean
-.clean-impl: .clean-pre .validate-impl .depcheck-impl
- @#echo "=> Running $@... Configuration=$(CONF)"
- "${MAKE}" -f nbproject/Makefile-${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .clean-conf
-
-
-# clobber
-.clobber-impl: .clobber-pre .depcheck-impl
- @#echo "=> Running $@..."
- for CONF in ${ALLCONFS}; \
- do \
- "${MAKE}" -f nbproject/Makefile-$${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .clean-conf; \
- done
-
-# all
-.all-impl: .all-pre .depcheck-impl
- @#echo "=> Running $@..."
- for CONF in ${ALLCONFS}; \
- do \
- "${MAKE}" -f nbproject/Makefile-$${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .build-conf; \
- done
-
-# build tests
-.build-tests-impl: .build-impl .build-tests-pre
- @#echo "=> Running $@... Configuration=$(CONF)"
- "${MAKE}" -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .build-tests-conf
-
-# run tests
-.test-impl: .build-tests-impl .test-pre
- @#echo "=> Running $@... Configuration=$(CONF)"
- "${MAKE}" -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .test-conf
-
-# dependency checking support
-.depcheck-impl:
- @echo "# This code depends on make tool being used" >.dep.inc
- @if [ -n "${MAKE_VERSION}" ]; then \
- echo "DEPFILES=\$$(wildcard \$$(addsuffix .d, \$${OBJECTFILES}))" >>.dep.inc; \
- echo "ifneq (\$${DEPFILES},)" >>.dep.inc; \
- echo "include \$${DEPFILES}" >>.dep.inc; \
- echo "endif" >>.dep.inc; \
- else \
- echo ".KEEP_STATE:" >>.dep.inc; \
- echo ".KEEP_STATE_FILE:.make.state.\$${CONF}" >>.dep.inc; \
- fi
-
-# configuration validation
-.validate-impl:
- @if [ ! -f nbproject/Makefile-${CONF}.mk ]; \
- then \
- echo ""; \
- echo "Error: can not find the makefile for configuration '${CONF}' in project ${PROJECTNAME}"; \
- echo "See 'make help' for details."; \
- echo "Current directory: " `pwd`; \
- echo ""; \
- fi
- @if [ ! -f nbproject/Makefile-${CONF}.mk ]; \
- then \
- exit 1; \
- fi
-
-
-# help
-.help-impl: .help-pre
- @echo "This makefile supports the following configurations:"
- @echo " ${ALLCONFS}"
- @echo ""
- @echo "and the following targets:"
- @echo " build (default target)"
- @echo " clean"
- @echo " clobber"
- @echo " all"
- @echo " help"
- @echo ""
- @echo "Makefile Usage:"
- @echo " make [CONF=<CONFIGURATION>] [SUB=no] build"
- @echo " make [CONF=<CONFIGURATION>] [SUB=no] clean"
- @echo " make [SUB=no] clobber"
- @echo " make [SUB=no] all"
- @echo " make help"
- @echo ""
- @echo "Target 'build' will build a specific configuration and, unless 'SUB=no',"
- @echo " also build subprojects."
- @echo "Target 'clean' will clean a specific configuration and, unless 'SUB=no',"
- @echo " also clean subprojects."
- @echo "Target 'clobber' will remove all built files from all configurations and,"
- @echo " unless 'SUB=no', also from subprojects."
- @echo "Target 'all' will will build all configurations and, unless 'SUB=no',"
- @echo " also build subprojects."
- @echo "Target 'help' prints this message."
- @echo ""
-
diff --git a/nbproject/Makefile-variables.mk b/nbproject/Makefile-variables.mk
deleted file mode 100644
index 82e95d4..0000000
--- a/nbproject/Makefile-variables.mk
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# Generated - do not edit!
-#
-# NOCDDL
-#
-CND_BASEDIR=`pwd`
-CND_BUILDDIR=build
-CND_DISTDIR=dist
-# Debug configuration
-CND_PLATFORM_Debug=GNU-Linux-x86
-CND_ARTIFACT_DIR_Debug=dist/Debug/GNU-Linux-x86
-CND_ARTIFACT_NAME_Debug=cpptictactoe
-CND_ARTIFACT_PATH_Debug=dist/Debug/GNU-Linux-x86/cpptictactoe
-CND_PACKAGE_DIR_Debug=dist/Debug/GNU-Linux-x86/package
-CND_PACKAGE_NAME_Debug=cpptictactoe.tar
-CND_PACKAGE_PATH_Debug=dist/Debug/GNU-Linux-x86/package/cpptictactoe.tar
-# Release configuration
-CND_PLATFORM_Release=GNU-Linux-x86
-CND_ARTIFACT_DIR_Release=dist/Release/GNU-Linux-x86
-CND_ARTIFACT_NAME_Release=cpptictactoe
-CND_ARTIFACT_PATH_Release=dist/Release/GNU-Linux-x86/cpptictactoe
-CND_PACKAGE_DIR_Release=dist/Release/GNU-Linux-x86/package
-CND_PACKAGE_NAME_Release=cpptictactoe.tar
-CND_PACKAGE_PATH_Release=dist/Release/GNU-Linux-x86/package/cpptictactoe.tar
-# Win64 configuration
-CND_PLATFORM_Win64=GNU-Linux-x86
-CND_ARTIFACT_DIR_Win64=dist/Win64/GNU-Linux-x86
-CND_ARTIFACT_NAME_Win64=cpptictactoe.exe
-CND_ARTIFACT_PATH_Win64=dist/Win64/GNU-Linux-x86/cpptictactoe.exe
-CND_PACKAGE_DIR_Win64=dist/Win64/GNU-Linux-x86/package
-CND_PACKAGE_NAME_Win64=cpptictactoe.tar
-CND_PACKAGE_PATH_Win64=dist/Win64/GNU-Linux-x86/package/cpptictactoe.tar
-#
-# include compiler specific variables
-#
-# dmake command
-ROOT:sh = test -f nbproject/private/Makefile-variables.mk || \
- (mkdir -p nbproject/private && touch nbproject/private/Makefile-variables.mk)
-#
-# gmake command
-.PHONY: $(shell test -f nbproject/private/Makefile-variables.mk || (mkdir -p nbproject/private && touch nbproject/private/Makefile-variables.mk))
-#
-include nbproject/private/Makefile-variables.mk
diff --git a/nbproject/Package-Debug.bash b/nbproject/Package-Debug.bash
deleted file mode 100644
index 7cf9b2f..0000000
--- a/nbproject/Package-Debug.bash
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/bin/bash -x
-
-#
-# Generated - do not edit!
-#
-
-# Macros
-TOP=`pwd`
-CND_PLATFORM=GNU-Linux-x86
-CND_CONF=Debug
-CND_DISTDIR=dist
-CND_BUILDDIR=build
-CND_DLIB_EXT=so
-NBTMPDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tmp-packaging
-TMPDIRNAME=tmp-packaging
-OUTPUT_PATH=${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cpptictactoe
-OUTPUT_BASENAME=cpptictactoe
-PACKAGE_TOP_DIR=cpptictactoe/
-
-# Functions
-function checkReturnCode
-{
- rc=$?
- if [ $rc != 0 ]
- then
- exit $rc
- fi
-}
-function makeDirectory
-# $1 directory path
-# $2 permission (optional)
-{
- mkdir -p "$1"
- checkReturnCode
- if [ "$2" != "" ]
- then
- chmod $2 "$1"
- checkReturnCode
- fi
-}
-function copyFileToTmpDir
-# $1 from-file path
-# $2 to-file path
-# $3 permission
-{
- cp "$1" "$2"
- checkReturnCode
- if [ "$3" != "" ]
- then
- chmod $3 "$2"
- checkReturnCode
- fi
-}
-
-# Setup
-cd "${TOP}"
-mkdir -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package
-rm -rf ${NBTMPDIR}
-mkdir -p ${NBTMPDIR}
-
-# Copy files and create directories and links
-cd "${TOP}"
-makeDirectory "${NBTMPDIR}/cpptictactoe/bin"
-copyFileToTmpDir "${OUTPUT_PATH}" "${NBTMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755
-
-
-# Generate tar file
-cd "${TOP}"
-rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/cpptictactoe.tar
-cd ${NBTMPDIR}
-tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/cpptictactoe.tar *
-checkReturnCode
-
-# Cleanup
-cd "${TOP}"
-rm -rf ${NBTMPDIR}
diff --git a/nbproject/Package-Release.bash b/nbproject/Package-Release.bash
deleted file mode 100644
index da1f94b..0000000
--- a/nbproject/Package-Release.bash
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/bin/bash -x
-
-#
-# Generated - do not edit!
-#
-
-# Macros
-TOP=`pwd`
-CND_PLATFORM=GNU-Linux-x86
-CND_CONF=Release
-CND_DISTDIR=dist
-CND_BUILDDIR=build
-CND_DLIB_EXT=so
-NBTMPDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tmp-packaging
-TMPDIRNAME=tmp-packaging
-OUTPUT_PATH=${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cpptictactoe
-OUTPUT_BASENAME=cpptictactoe
-PACKAGE_TOP_DIR=cpptictactoe/
-
-# Functions
-function checkReturnCode
-{
- rc=$?
- if [ $rc != 0 ]
- then
- exit $rc
- fi
-}
-function makeDirectory
-# $1 directory path
-# $2 permission (optional)
-{
- mkdir -p "$1"
- checkReturnCode
- if [ "$2" != "" ]
- then
- chmod $2 "$1"
- checkReturnCode
- fi
-}
-function copyFileToTmpDir
-# $1 from-file path
-# $2 to-file path
-# $3 permission
-{
- cp "$1" "$2"
- checkReturnCode
- if [ "$3" != "" ]
- then
- chmod $3 "$2"
- checkReturnCode
- fi
-}
-
-# Setup
-cd "${TOP}"
-mkdir -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package
-rm -rf ${NBTMPDIR}
-mkdir -p ${NBTMPDIR}
-
-# Copy files and create directories and links
-cd "${TOP}"
-makeDirectory "${NBTMPDIR}/cpptictactoe/bin"
-copyFileToTmpDir "${OUTPUT_PATH}" "${NBTMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755
-
-
-# Generate tar file
-cd "${TOP}"
-rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/cpptictactoe.tar
-cd ${NBTMPDIR}
-tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/cpptictactoe.tar *
-checkReturnCode
-
-# Cleanup
-cd "${TOP}"
-rm -rf ${NBTMPDIR}
diff --git a/nbproject/Package-Win64.bash b/nbproject/Package-Win64.bash
deleted file mode 100644
index 81ec1a3..0000000
--- a/nbproject/Package-Win64.bash
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/bin/bash -x
-
-#
-# Generated - do not edit!
-#
-
-# Macros
-TOP=`pwd`
-CND_PLATFORM=GNU-Linux-x86
-CND_CONF=Win64
-CND_DISTDIR=dist
-CND_BUILDDIR=build
-CND_DLIB_EXT=so
-NBTMPDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tmp-packaging
-TMPDIRNAME=tmp-packaging
-OUTPUT_PATH=${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cpptictactoe.exe
-OUTPUT_BASENAME=cpptictactoe.exe
-PACKAGE_TOP_DIR=cpptictactoe/
-
-# Functions
-function checkReturnCode
-{
- rc=$?
- if [ $rc != 0 ]
- then
- exit $rc
- fi
-}
-function makeDirectory
-# $1 directory path
-# $2 permission (optional)
-{
- mkdir -p "$1"
- checkReturnCode
- if [ "$2" != "" ]
- then
- chmod $2 "$1"
- checkReturnCode
- fi
-}
-function copyFileToTmpDir
-# $1 from-file path
-# $2 to-file path
-# $3 permission
-{
- cp "$1" "$2"
- checkReturnCode
- if [ "$3" != "" ]
- then
- chmod $3 "$2"
- checkReturnCode
- fi
-}
-
-# Setup
-cd "${TOP}"
-mkdir -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package
-rm -rf ${NBTMPDIR}
-mkdir -p ${NBTMPDIR}
-
-# Copy files and create directories and links
-cd "${TOP}"
-makeDirectory "${NBTMPDIR}/cpptictactoe/bin"
-copyFileToTmpDir "${OUTPUT_PATH}" "${NBTMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755
-
-
-# Generate tar file
-cd "${TOP}"
-rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/cpptictactoe.tar
-cd ${NBTMPDIR}
-tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/cpptictactoe.tar *
-checkReturnCode
-
-# Cleanup
-cd "${TOP}"
-rm -rf ${NBTMPDIR}
diff --git a/nbproject/configurations.xml b/nbproject/configurations.xml
deleted file mode 100644
index 870b6db..0000000
--- a/nbproject/configurations.xml
+++ /dev/null
@@ -1,123 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<configurationDescriptor version="95">
- <logicalFolder name="root" displayName="root" projectFiles="true" kind="ROOT">
- <logicalFolder name="HeaderFiles"
- displayName="Header Files"
- projectFiles="true">
- <itemPath>Gameboard.h</itemPath>
- <itemPath>Player.h</itemPath>
- </logicalFolder>
- <logicalFolder name="ResourceFiles"
- displayName="Resource Files"
- projectFiles="true">
- </logicalFolder>
- <logicalFolder name="SourceFiles"
- displayName="Source Files"
- projectFiles="true">
- <itemPath>Gameboard.cpp</itemPath>
- <itemPath>Player.cpp</itemPath>
- <itemPath>main.cpp</itemPath>
- </logicalFolder>
- <logicalFolder name="TestFiles"
- displayName="Test Files"
- projectFiles="false"
- kind="TEST_LOGICAL_FOLDER">
- </logicalFolder>
- <logicalFolder name="ExternalFiles"
- displayName="Important Files"
- projectFiles="false"
- kind="IMPORTANT_FILES_FOLDER">
- <itemPath>Makefile</itemPath>
- </logicalFolder>
- <itemPath>README.md</itemPath>
- </logicalFolder>
- <projectmakefile>Makefile</projectmakefile>
- <confs>
- <conf name="Debug" type="1">
- <toolsSet>
- <compilerSet>default</compilerSet>
- <dependencyChecking>true</dependencyChecking>
- <rebuildPropChanged>false</rebuildPropChanged>
- </toolsSet>
- <compileType>
- </compileType>
- <item path="Gameboard.cpp" ex="false" tool="1" flavor2="0">
- </item>
- <item path="Gameboard.h" ex="false" tool="3" flavor2="0">
- </item>
- <item path="Player.cpp" ex="false" tool="1" flavor2="0">
- </item>
- <item path="Player.h" ex="false" tool="3" flavor2="0">
- </item>
- <item path="README.md" ex="false" tool="3" flavor2="0">
- </item>
- <item path="main.cpp" ex="false" tool="1" flavor2="0">
- </item>
- </conf>
- <conf name="Release" type="1">
- <toolsSet>
- <compilerSet>default</compilerSet>
- <dependencyChecking>true</dependencyChecking>
- <rebuildPropChanged>false</rebuildPropChanged>
- </toolsSet>
- <compileType>
- <cTool>
- <developmentMode>5</developmentMode>
- </cTool>
- <ccTool>
- <developmentMode>5</developmentMode>
- </ccTool>
- <fortranCompilerTool>
- <developmentMode>5</developmentMode>
- </fortranCompilerTool>
- <asmTool>
- <developmentMode>5</developmentMode>
- </asmTool>
- </compileType>
- <item path="Gameboard.cpp" ex="false" tool="1" flavor2="0">
- </item>
- <item path="Gameboard.h" ex="false" tool="3" flavor2="0">
- </item>
- <item path="Player.cpp" ex="false" tool="1" flavor2="0">
- </item>
- <item path="Player.h" ex="false" tool="3" flavor2="0">
- </item>
- <item path="README.md" ex="false" tool="3" flavor2="0">
- </item>
- <item path="main.cpp" ex="false" tool="1" flavor2="0">
- </item>
- </conf>
- <conf name="Win64" type="1">
- <toolsSet>
- <compilerSet>default</compilerSet>
- <dependencyChecking>true</dependencyChecking>
- <rebuildPropChanged>false</rebuildPropChanged>
- </toolsSet>
- <compileType>
- <ccTool>
- <standard>8</standard>
- <commandlineTool>x86_64-w64-mingw32-g++</commandlineTool>
- </ccTool>
- <asmTool>
- <commandlineTool>as</commandlineTool>
- </asmTool>
- <linkerTool>
- <output>${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cpptictactoe.exe</output>
- <commandlineTool>x86_64-w64-mingw32-g++</commandlineTool>
- </linkerTool>
- </compileType>
- <item path="Gameboard.cpp" ex="false" tool="1" flavor2="0">
- </item>
- <item path="Gameboard.h" ex="false" tool="3" flavor2="0">
- </item>
- <item path="Player.cpp" ex="false" tool="1" flavor2="0">
- </item>
- <item path="Player.h" ex="false" tool="3" flavor2="0">
- </item>
- <item path="README.md" ex="false" tool="3" flavor2="0">
- </item>
- <item path="main.cpp" ex="false" tool="1" flavor2="0">
- </item>
- </conf>
- </confs>
-</configurationDescriptor>
diff --git a/nbproject/project.xml b/nbproject/project.xml
deleted file mode 100644
index 77888e8..0000000
--- a/nbproject/project.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://www.netbeans.org/ns/project/1">
- <type>org.netbeans.modules.cnd.makeproject</type>
- <configuration>
- <data xmlns="http://www.netbeans.org/ns/make-project/1">
- <name>CppTicTacToe</name>
- <c-extensions/>
- <cpp-extensions>cpp</cpp-extensions>
- <header-extensions>h</header-extensions>
- <sourceEncoding>UTF-8</sourceEncoding>
- <make-dep-projects/>
- <sourceRootList/>
- <confList>
- <confElem>
- <name>Debug</name>
- <type>1</type>
- </confElem>
- <confElem>
- <name>Release</name>
- <type>1</type>
- </confElem>
- <confElem>
- <name>Win64</name>
- <type>1</type>
- </confElem>
- </confList>
- <formatting>
- <project-formatting-style>false</project-formatting-style>
- </formatting>
- </data>
- </configuration>
-</project>