Merge pull request #1 from Rudi9719/master

Makefile and gitignore
This commit is contained in:
jordanmason-stleo
2020-09-20 15:14:12 -04:00
committed by GitHub
2 changed files with 30 additions and 0 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
*.class
manifest.txt
*.jar

27
Makefile Normal file
View File

@ -0,0 +1,27 @@
JCC = javac
JFLAGS = -g
default:
@echo \"make build\" to compile Java classes
@echo \"make run\" to run Driver class
@echo \"make jar\" to compile executable jar
@echo \"make clean\" to clean up artifacts
build:
$(JCC) $(JFLAGS) Driver.java
run:
$(JCC) $(JFLAGS) Driver.java
java Driver
jar:
$(JCC) $(JFLAGS) Driver.java
@echo "Manifest-Version: 1.0" > manifest.txt
@echo "Class-Path: ." >> manifest.txt
@echo "Main-Class: Driver" >> manifest.txt
@echo "" >> manifest.txt
jar -cmf manifest.txt MTGClone.jar *.class
$(RM) manifest.txt
$(RM) *.class
clean:
$(RM) *.class
$(RM) manifest.txt
$(RM) MTGClone.jar