Make is a build automation tool that helps compile and manage large projects by reading instructions from a file called a Makefile
.
javac
commandsmake
command.Makefile
in the current directory.This example builds a Java program with two classes: Main.java
and Utils.java
.
# Makefile for Java
JAVAC = javac
JAVA_FILES = Main.java Utils.java
all: Main.class
Main.class: $(JAVA_FILES)
$(JAVAC) $(JAVA_FILES)
clean:
rm -f *.class
Learn more about Make at the official GNU Make Documentation.