Created
August 24, 2018 15:55
-
-
Save the-mikedavis/23a4c0fc4e2338c5535c3b2245257c83 to your computer and use it in GitHub Desktop.
Minimalistic Java Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JFLAGS = -g | |
JC = javac | |
.SUFFIXES: .java .class | |
.java.class: | |
$(JC) $(JFLAGS) $*.java | |
CLASSES = \ | |
main.java \ | |
Person.java \ | |
Place.java \ | |
Thing.java | |
default: classes | |
classes: $(CLASSES:.java=.class) | |
clean: | |
$(RM) *.class | |
run: | |
java main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The below works a lot better IMO, and it respects the usual Maven/Gradle
src/main/java
andtarget/classes
directory structure: