From 352f99100535528fe28e0ce3ce25572285372e8b Mon Sep 17 00:00:00 2001 From: MaurizioBruetsch <32775189+MaurizioBruetsch@users.noreply.github.com> Date: Fri, 27 Oct 2017 17:50:04 +0200 Subject: [PATCH] Makefile is for UNIX and makeWindows is for Windows --- Makefile | 8 ++++---- makeWindows | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 4 deletions(-) create mode 100644 makeWindows diff --git a/Makefile b/Makefile index b4585cd..6498bb4 100644 --- a/Makefile +++ b/Makefile @@ -36,16 +36,16 @@ P2= all: $(CLASSES) $(FXMLS_BUILD) - $(JAVAC) $(JAVAC_OPTIONS) -cp $(CLASSPATH);$(LIBRARIES) $(CLASSES) -d $(BUILDS) + $(JAVAC) $(JAVAC_OPTIONS) -cp $(CLASSPATH):$(LIBRARIES) $(CLASSES) -d $(BUILDS) run: $(CLASSES) - $(JAVA) -cp $(BUILDS);$(LIBRARIES) $(MAIN) $(P1) $(P2) + $(JAVA) -cp $(BUILDS):$(LIBRARIES) $(MAIN) $(P1) $(P2) simulate: $(CLASSES) - $(JAVA) -cp $(BUILDS);$(LIBRARIES) $(MAIN) $(N) + $(JAVA) -cp $(BUILDS):$(LIBRARIES) $(MAIN) $(N) doc: $(CLASSES) - $(JAVADOC) $(JAVADOC_OPTIONS) -cp $(CLASSPATH);$(LIBARIES) $(CLASSES) -d $(DOC) + $(JAVADOC) $(JAVADOC_OPTIONS) -cp $(CLASSPATH):$(LIBARIES) $(CLASSES) -d $(DOC) jar: all $(JAR) -cfe VierGewinnt.jar $(MAIN) -C $(BUILDS) . diff --git a/makeWindows b/makeWindows new file mode 100644 index 0000000..b70233f --- /dev/null +++ b/makeWindows @@ -0,0 +1,50 @@ +JAVA=java +JAVAC=javac +JAVADOC=javadoc +JAR=jar + +JAVAC_OPTIONS=-Xlint:all +JAVADOC_OPTIONS=-Xdoclint:all -private -encoding UTF-8 -charset UTF-8 -docencoding UTF-8 + +BUILDS=builds +DOC=doc +CLASSPATH=src +LIBARIES=\ +lib/jansi-1.16.jar +CLASSES=\ +src/game/Main.java \ +src/game/Game.java \ +src/game/GameHistory.java \ +src/game/GameEntry.java \ +src/game/PlayerObject.java \ +src/player/Player.java \ +src/player/malte/MalteAI.java \ +src/player/malte/Pattern.java \ +src/player/malte/Item.java \ +src/player/maurizio/MaurizioAI.java + +OBJECTS=$($(subst $(CLASSPATH),$(BUILDS),$(CLASSES)):.java=.class) + +BUILDFILES=$(OBJECTS) $(FXMLS_BUILD) + +MAIN=game.Main + +N=100 + +all: $(CLASSES) $(FXMLS_BUILD) + $(JAVAC) $(JAVAC_OPTIONS) -cp $(CLASSPATH);$(LIBARIES) $(CLASSES) -d $(BUILDS) + +run: $(CLASSES) + $(JAVA) -cp $(BUILDS);$(LIBARIES) $(MAIN) + +simulate: $(CLASSES) + $(JAVA) -cp $(BUILDS);$(LIBARIES) $(MAIN) $(N) + +doc: $(CLASSES) + $(JAVADOC) $(JAVADOC_OPTIONS) -cp $(CLASSPATH);$(LIBARIES) $(CLASSES) -d $(DOC) + +jar: all + $(JAR) -cfe VierGewinnt.jar $(MAIN) -C $(BUILDS) . + +clean: + rm -rf $(BUILDS)/* $(DOC)/* VierGewinnt.jar