Makefile Problem??!

Gast #180738
Lesenswert?
• ▲
▼
Hallo,
ich habe ein Problem das evtl. das Makefile betrifft. Ich habe mit
MFile --> "MCU=atmega16, F_CPU=10000000 und TARGET=test" eingetragen
und im selben Verzeichnis wie das Programm gespeichert.
Aber wenn ich im PN "make all" ausführe bekomme ich diese Meldung:

make.exe: *** No rule to make target `test.o', needed by `test.elf'.
Stop.

> Process Exit Code: 2

Was hat das zu bedeuten? Ich muss noch hinzufügen das ich mit C erst
begonnen habe. Also noch Anfänger bin.

Danke
Gast #180739
Lesenswert?
• ▲
▼
Hallo,

schreib bitte noch dazu wie das make aufgerufen wurde (müsste kurz vor
der Fehlermeldung im Ausgabefenster stehen).

Wie heißt dein makefile ? Wenn es nicht nur "makefile" (ohne
Erweiterung) heißt, musst du dem make das noch mit -f mitteilen.
ggf. auch mal das makefile im Anhang dranhängen.

Stefan
Gast #180740
Lesenswert?
• ▲
▼
ich denke, es liegt eher daran, das du deine datei test.c genannt hast,
im makefile in der rubrik main aber eine andere datei compiliert werden
soll. kuck doch einfach mal ins makefile rein. ist eigentlich nicht so
schwer.
Werner
Gast #180742
Lesenswert?
• ▲
▼
Hallo,
ich verstehe nicht so ganz was ihr meint. sorry!
Die Makefile hab ich nur "Makefile" genannt. Wenn ich unter "Tools"
-> "make" ausführe (weiss nicht so genau für was das sein soll) bekomm
ich diese Meldung:

-------- begin --------
avr-gcc (GCC) 3.4.3
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

D:\Programme\WinAVR\utils\bin\make.exe: *** No rule to make target
`test.o', needed by `test.elf'.  Stop.

> Process Exit Code: 2

Bei "Make all" diese:

-------- begin --------
avr-gcc (GCC) 3.4.3
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

make.exe: *** No rule to make target `test.o', needed by `test.elf'.
Stop.

> Process Exit Code: 2

Ich hab die Datei einfach nur "test" genannt beim speichern. In der
Makefile habe ich auch nur "test" hingeschrieben ohne .c!
Oder meint ihr was Anderes damit?
Gast #180744
Lesenswert?
• ▲
▼
Die Datei mit dem C-Code muss natürlich auf .c/.h enden!
Auch wenn Du bei "TARGET" nur test angibst.
Such mal etwas weiter unten im Makefile, wo "$(TARGET)" eingesetzt
wird, die Zeile wird wahrscheinlich dann diesen Eintrag entahlten:
$(TARGET).c

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren