I am trying to make a makefile(makeSupersonic) for the following compilation:
> g++ -o supersonic_ob supersonic_ob.C flow_field.C function_declarations.C Boundary.C Time_Step.C -lm
It gives the following error messages when I type
GCOMPILE = g++-4.0
CODE = supersonic_ob1
OBJECTS = $(CODE).o flow_field.o Boundary.o Time_step.o function_declarations.o
$(GCOMPILE) -o $(CODE) $(FOPTIONS) $(OBJECTS)
./makeSupersonic: line 1: GCOMPILE: command not found
./makeSupersonic: line 2: FOPTIONS: command not found
./makeSupersonic: line 3: CODE: command not found
Moved: build tool question.
It sort of looks like you're trying to execute the makefile itself... (should it have executable permission + it lacks a shebang? Not a *nix expert here...)
Just run make. ie:
Also, "GCOMPILE" seems... outlandish. I believe most people use CPP there, and it might already (depending on your make and system) be already set to g++.
make -f makeSupersonic
You should also have tabs before the commands (but not the rules) but this may have been lost to the board's formating. IIRC, it's:
(without $s, and using %s.) (And COMPILE is undefined...)
Attach the file. It is likely an indentation issue.