My first question in stack overflow... Kind of excited but still struggling in the problem.
Alright, My question is how to pass parameters from command line to a java program through makefile.
Honestly I don't really know wether my description is correct....... Cause I don't really know much about makefile... In my assignment, the description is that we must develop a Makefile for GNU make to build our program. For example, the command lines
make
mipsim -v < test1.cmd > test1.log
will build the ISS (a simulator we made) and then run it with debugging output, taking input commands from the file test1.cmd and writing result to test1.log.
I have finished the program but I don't know how to make the things above happen. What I know so far is just to use makefile to make the .class file from .java file.... I have no idea about how to get test1.cmd as my input file's name and test1.log as my output file's name from command lines.... I guess these two names probably will get into my program through String[] args in the main function...
Could anybody give me some help please?
Thanks