Make

Variabeln

CC = C Compiler
CPP = C Präprozessor
CXX = C++ Compiler
CURDIR = Aktuelles Verzeichnis

Parameter

Anzeigen aller Standardmässigen Variabeln und Regeln

make -p

Mehrere (5) Prozesse kreieren um zu Kompilieren

make -j 5

Makefile Angeben (ansonsten muss dass Makefile "Makefile" heissen, damit einfach make eingegeben werden kann)

make -f theMakeFile

Hilfetools

makedepend

Errechnet die Abhängikeiten im Makefile

Sample Makefiles

Auf einem Debian System mit pthread library

 all: tankd.c
         gcc -o tankd tankd.c -pthread
 clean:
         rm -f *~ *.bak

Gleicher Sourcecode aber Makefile für Solaris

 all: tankd.c
         gcc -o server tankd.c -lpthread -lsocket -lnsl -lresolv
 clean:
         rm -f *~ *.bak

Trackback URL for this post:

http://www.2030.tk/trackback/36

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Use <fn>...</fn> to insert automatically numbered footnotes.
  • You can use the <go> tags just like the <a> for nicer urls.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. Beside the tag style "<foo>" it is also possible to use "[foo]".
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.