Hallo!
Weiß jemand ein makemake, das Makefiles automatisch aus Source-Code generiert?
Gruss
Alois
Hallo!
Weiß jemand ein makemake, das Makefiles automatisch aus Source-Code generiert?
Gruss
Alois
Unter Qt qmake ist das begrenzt möglich.
Für ein Standard make program brauchst du ein minimales configure.in Makefile.am
configure.in:
Makefile.amCode:AC_PREREQ(2.61) AC_INIT("example", "0.0.1", "me@localhost") AM_CONFIG_HEADER([config.h]) AM_INIT_AUTOMAKE([foreign -Wall]) AC_PROG_CC AC_HEADER_STDC AC_CHECK_HEADERS([stdlib.h]) AC_CONFIG_FILES([Makefile]) AC_OUTPUT
main.cCode:bin_PROGRAMS = example example_SOURCES = main.c
Danach ein:Code:#include <stdio.h> #include <stdlib.h> int main( void ) { printf("Hallo.."); return EXIT_SUCCESS; }
autoreconf -fvi
./configure
make
mfg undefined
--
Undefined Behavior (undefiniertes Verhalten) bedeutet meistens etwas ungültiges.
xhtml Debugger
KDE benutzt mittlerweile cmake - auch recht nett. http://www.cmake.org
MfG Peschmä
The greatest trick the Devil ever pulled was convincing the world he didn't exist. -- The Usual Suspects (1995)
Hey, I feel their pain. It's irritating as hell when people act like they have rights. The great old one (2006)
Hmm. mir ist nicht bekannt das CMake so etwas wie z.B. QMake
kann.Code:qmke -project && qmake -makefile
Wenn ja - wissen wollen
mfg undefined
--
Undefined Behavior (undefiniertes Verhalten) bedeutet meistens etwas ungültiges.
xhtml Debugger
Dafür musst du mit CMake faktisch nicht 100MB Qt-Bibliotheken installieren (Ja, ich übertreibe, aber für ein nicht-Qt Projekt ein Make-Tool zu verwenden das Qt voraussetzt?)
Alles hat seine Vorteile und Nachteile.
MfG Peschmä
The greatest trick the Devil ever pulled was convincing the world he didn't exist. -- The Usual Suspects (1995)
Hey, I feel their pain. It's irritating as hell when people act like they have rights. The great old one (2006)
Ich verwende gerne SCons.
Das von undefined oben aufgeführte Beispiel reduziert sich damit auf eine SConstruct Script:
Komplexere Aufgaben werden dadurch erleichtert, dass man in übersichtlichem Python anstelle Haufenweise M4, Bash und Automake schreiben kann.Code:Program('example', source = ['main.c'], CCFLAGS = ['-Wall'])
cmake ist eine würdige Alternative.
Gruess, Andy
Lesezeichen