-
make file
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
Code:
GCOMPILE = g++-4.0
FOPTIONS =
CODE = supersonic_ob1
OBJECTS = $(CODE).o flow_field.o Boundary.o Time_step.o function_declarations.o
$(CODE): $(OBJECTS)
$(GCOMPILE) -o $(CODE) $(FOPTIONS) $(OBJECTS)
$*.o: $*.C
$(COMPILE)
It gives the following error messages when I type
>./makeSupersonic
./makeSupersonic: line 1: GCOMPILE: command not found
./makeSupersonic: line 2: FOPTIONS: command not found
./makeSupersonic: line 3: CODE: command not found
etc....
Shuo
-
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:
Code:
make -f makeSupersonic
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++.
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.