So I have looked at a lot of examples online and tried to modify them to what I need, but nothing has worked. I need a makefile so that my teacher can create my project just by typing "make" into terminal (this is a requirement of the project for some reason). My end goal is to be able to type "sim" followed by the required commands as defined by my code. The code runs in eclipse, but I can't get it to run using these commands in terminal. It will make the file, but it says "sim: command not found" when I try to type "sim....(arguments)" into terminal. I'm sure this is a dumb question but we have not learned about this in school and I have no experience with Makefile.
Below is my makefile.
JFLAGS = -g
JC = javac
OPT = -O3
#OPT = -g
WARN = -Wall
sim: sim.class
sim.class: sim.java
$(JC) $(JFLAGS) sim.java
clean:
$(RM) sim.class
clobber:
$(RM) sim.class
Aucun commentaire:
Enregistrer un commentaire