PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Fortran 95 Makefile Probleme



BlauesQ
17-05-2005, 20:33
Hallo,
weiß gar nicht ob ich hier richtig bin.

Folgendes:
ich habe 4 Dateien die zu einem Programm zusammengeführt werden sollen mit Makefile. Die Dateien heißen main.f, rechnen.f, lesen.f und schreiben.f

nun wollte ich mit Makefile das machen (habe aber absolut keine Ahnung davon kenne mich nur mit Turbo Pascal aus :) ) Na ja jedenfalls habe ich das mit dem vi versucht. und wollte dann das make ausführen jedoch gab es das: "make: *** Keine Targets angegeben und keine »make«-Steuerdatei gefunden. Schluss."

habe aber keine Ahnung was das heißt ob ich alles richtig gemacht habe usw. Habe aber auch sehr sehr wenig Ahnung von LINUX also nicht zu kompliziert schreiben...

meine make:


LINKER=ifc
COMPILER=ifc -FR -W95 -c -Vaxlib
OBJECTS=main.o lesen.o rechnen.o schreiben.o
LIBS=
PROGRAMILER=bsp

# Regeln zur Programmerstellung

$(PROG):$(OBJECTS)
$(LINK) $(OBJECTS) -o$(PROG)

#Regeln für Objects

main.o : main.f
$(COMP) main.f
rechnen.o : rechnen.f
$(COMP) lesen.f
rechnen.o : rechnen.f
$(COMP) rechnen.f
schreiben.o : schreiben.f
$(COMP) schreiben.f


Hoffe ich bekomme Hilfe

und wenn ich hier falsch gepostet habe bitte sagen und ich lösche es wieder...

Grüße

Joghurt
18-05-2005, 00:11
1. Die Datei muss Makefile heißen
2. Die Anweisungen, die Ausgeführt werden sollen (also z.B. das $(COMP) main.f) müssen mit einem Tabulator eingerückt sein.
Also in etwa so

blabla.o : blabla.c
gcc -c blabla.cwobei dir 8 Leerzeichen ein Tab sein sollen.

BlauesQ
18-05-2005, 06:39
Die Tabulatortaste habe ich dort gedrückt...
nach umbenennen fängt er wenigstens schonmal an, jedoch nur damit:

./Makefile: line 8: -FR: command not found
./Makefile: line 9: lesen.o: command not found
./Makefile: line 1: PROG: command not found
./Makefile: line 1: OBJECTS: command not found
./Makefile: line 1: LINK: command not found
./Makefile: line 1: OBJECTS: command not found
./Makefile: line 1: PROG: command not found
./Makefile: line 16: -o: command not found
./Makefile: line 20: main.o: command not found
./Makefile: line 1: COMP: command not found
./main.f: line 1: PROGRAM: command not found
./main.f: line 3: syntax error near unexpected token `nicht'
./main.f: line 3: `! Deklarationsteil (nicht im Struktogramm)'
./Makefile: line 22: rechnen.o: command not found
./Makefile: line 1: COMP: command not found
./lesen.f: line 1: syntax error near unexpected token `('
./lesen.f: line 1: ` SUBROUTINE lesen(x, n)'
./Makefile: line 24: rechnen.o: command not found
./Makefile: line 1: COMP: command not found
./rechnen.f: line 1: syntax error near unexpected token `('
./rechnen.f: line 1: `SUBROUTINE rechnen (x, n, quadr, sinu, amitt)'
./Makefile: line 26: schreiben.o: command not found
./Makefile: line 1: COMP: command not found
./schreiben.f: line 1: syntax error near unexpected token `('
./schreiben.f: line 1: `SUBROUTINE schreiben (x, n, quadr, sinu, amitt)'


hm.??