I have a program that I wish to run and this is how one normally runs it using the command line:
java AvlTree.java inputs.txt
I wish to create a makefile for executing the above command such that it takes the command line argument which is the file_name: inputs.txt
This is the following makefile I have written:
JFLAGS = -g
JC = javac
.SUFFIXES: .java .class
.java.class:
$(JC) $(JFLAGS) $*.java
CLASSES = \
AVLTree.java
default: classes
classes: $(CLASSES:.java=.class)
clean:
$(RM) *.class
I do not know how to tell the makefile to use the command line argument inputs.txt. Moreover, if I type make in the command line, will it execute my program also? Or will it create an executable?
I have placed the source code: AvlTree.java, inputs.txt, and the makefile in the same folder. Any help will be appreciated.
javaonly tojavac.