Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not sure why the Makefile is still missing #43

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
56 changes: 56 additions & 0 deletions GameEngine/Battleships/Makefile
@@ -0,0 +1,56 @@
MONO=mono
XBUILD=xbuild
SOURCEDIR=.
NUGET=nuget
TARGET=$(SOURCEDIR)/Battleships/bin/Debug/Battleships.exe
PACKAGEDIR=./packages/
NUGETCMD=$(NUGET) install -OutputDirectory $(PACKAGEDIR)
DEPS=$(shell find $(SOURCEDIR) -name 'packages.config')

$(PACKAGEDIR):
mkdir $(PACKAGEDIR)

$(DEPS): $(PACKAGEDIR)
@echo "finding dependencies and installing"
@$(foreach dep, $(DEPS), $(NUGETCMD) $(dep);)

clean-objs:
rm -fr $(SOURCEDIR)/Battleships/bin/
rm -fr $(SOURCEDIR)/Battleships/obj/
rm -fr $(SOURCEDIR)/Battleships/Battleships/bin/
rm -fr $(SOURCEDIR)/Battleships/Battleships/obj/
rm -fr $(SOURCEDIR)/Battleships/Domain/bin/
rm -fr $(SOURCEDIR)/Battleships/Domain/obj/
rm -fr $(SOURCEDIR)/Battleships/GameEngine/bin/
rm -fr $(SOURCEDIR)/Battleships/GameEngine/obj/
rm -fr $(SOURCEDIR)/Battleships/Tests.Domain/bin/
rm -fr $(SOURCEDIR)/Battleships/Tests.Domain/obj/
rm -fr $(SOURCEDIR)/Battleships/BotRunner/bin/
rm -fr $(SOURCEDIR)/Battleships/BotRunner/obj/


clean-all: clean-objs
rm -fr $(PACKAGEDIR)
find $(SOURCEDIR)/ -iname "*.exe" -iname "*.dll" -iname "*.obj" -delete

clean: clean-objs

$(TARGET):
@echo "building"
$(XBUILD) $(SOURCEDIR)/Battleships.sln


deps: $(DEPS)

all: $(TARGET)

REFBOTHOME=$(HOME)/source/entelect-2017/dls/Version\ 1.0.0/refbots
SAMPLEBOTHOME=$(HOME)/source/entelect-2017/2017-Battleships/Sample\ Bots
runbots:
$(MONO) $(TARGET) -b $(REFBOTHOME)/C# $(SAMPLEBOTHOME)/Golang --clog --pretty --debug


runbots-recompile:
rm -fr $(SAMPLEBOTHOME)/Golang/main
rm -fr $(SAMPLEBOTHOME)/C#/SampleBot/bin
$(MONO) $(TARGET) -b $(SAMPLEBOTHOME)/C#/SampleBot $(SAMPLEBOTHOME)/Golang --clog --pretty --debug --forceRebuild