Created
September 10, 2016 15:13
-
-
Save hleonps/1031ea67c7c5fd7682e476bedd0a07fe to your computer and use it in GitHub Desktop.
Makefile Java
This file contains hidden or 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
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