Informatiker Board (http://www.informatikerboard.de/board/index.php)
- Themengebiete (http://www.informatikerboard.de/board/board.php?boardid=1)
-- Praktische Informatik (http://www.informatikerboard.de/board/board.php?boardid=6)
--- Makefile c++ (http://www.informatikerboard.de/board/thread.php?threadid=4062)


Geschrieben von Isa_hope am 25.11.2018 um 20:39:

  Makefile c++

Hallo smile
Ich bräuchte Hilfe bei der Erstellung eines Makefiles.
Ich habe folgende Dateien: main.cpp a.cpp b.cpp und c.cpp (und halt die .h-Dateien), wobei b und c von a erben.
Ich weiss nun nicht wirklich wie ich das makefile schreiben soll. Muss ich etwas wegen der Vererbung beachten?
Mein bisheriger Versuch sieht so aus:

main: main.cpp a.o a.h b.ob.h c.cop c.h
c++ main.cpp -o main a.o b.o c.o
a.o: a.cpp
c++ a.cpp -c -std=c++11
b.o: b.cpp
c++ b.cpp -c -std=c++11
c.o: c.cpp
c++ b.cpp -c -std=c++11


Forensoftware: Burning Board, entwickelt von WoltLab GmbH