I know makefiles are totally outdated for Java projects but we have to make one for a course assignment. Here is the makefile they gave us to use:
JAVAC=javac
sources = $(wildcard *.java)
classes = $(sources:.java=.class)
all: $(classes)
clean :
rm -f *.class
%.class : %.java
$(JAVAC) $<
I assume this should work because my prof gave it to us, does this look correct? Common practices/clarity isn't required it just needs to compile the one .java
file in the same folder.
Assuming the file is okay, how do I run it from windows cmd prompt?