diff --git a/Documentation/Compiling.txt b/Documentation/Compiling.txt index 4e3c3fe..083dc31 100755 --- a/Documentation/Compiling.txt +++ b/Documentation/Compiling.txt @@ -2,6 +2,10 @@ ====COMPILING.TXT==== +On Linux, run the Makefile: + make +or otherwise execute the following individual steps: + 1. Get your compiler version: javac -version and enter the version on line 19 of B4constants.java where it will become available diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..caa899d --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +# Name of the jarfile. +JARNAME=BEAM4.jar + +# Java version number. +JAVAVER=$(shell javac -version 2>&1) +STR="s/\(^ static final String COMPILER = \"Compiler was: \).*\(\";.*$$\)/\1${JAVAVER}\2/g" + +all: + @# Replace Java version number string in source code. + sed -i ${STR} Sources/B4constants.java + + @# Compile java files. + javac -Xlint Sources/*.java + + @# Create jar archive. + install -d com/stellarsoftware/beam/ + install -D Sources/*.class com/stellarsoftware/beam/ + jar cfe "${JARNAME}" com.stellarsoftware.beam.B4 com/ + +clean: + rm -rf Sources/*.class com/