Skip to content

Instantly share code, notes, and snippets.

@hleonps
Created September 10, 2016 15:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hleonps/1031ea67c7c5fd7682e476bedd0a07fe to your computer and use it in GitHub Desktop.
Save hleonps/1031ea67c7c5fd7682e476bedd0a07fe to your computer and use it in GitHub Desktop.
Makefile Java
JCC=javac -g
NAME=MainClass
MANIF=manifest.txt
RM = rm -rf
default: doJar
java -jar $(NAME).jar
doJar: doManifest
jar cvf0m $(NAME).jar $(MANIF) $(NAME).class (NAME2).class
doManifest: doClass
echo Main-Class: $(NAME) >$(MANIF)
doClass:
$(JCC) $(NAME).java Otra.java
clean:
$(RM) $(NAME) *class *jar
$(RM) $(MANIF)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment