Hi,
I'm very frustrated. I'm not able to get a working makefile for my project.
It has the following directory tree:
pallegro |_src | |_pallegro.pas | |_display.pas | |_keyboard.pas | |_altime.pas | |_define.c | |_keytypes.def |_Makefile
pallegro.pas depends on everything keyboard.pas depends on display.pas, define.c and keytypes.def display.pas depends on define.c altime.pas depends on define.c define.c depends on nothing keytypes.def depends on nothing
I'm not able to create a makefile. Especially the placement in the src directory produces problems. I get dependency problems all the time.
Could someone show me a basic makefile? I don't know how to proceed. :-( ________________________________________________________________ Neu: WEB.DE Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate für nur 19,99 Euro/mtl.!* http://produkte.web.de/go/02/
Martin Kalbfuß a écrit :
Hi,
I'm very frustrated. I'm not able to get a working makefile for my project.
It has the following directory tree:
pallegro |_src | |_pallegro.pas | |_display.pas | |_keyboard.pas | |_altime.pas | |_define.c | |_keytypes.def |_Makefile
pallegro.pas depends on everything keyboard.pas depends on display.pas, define.c and keytypes.def display.pas depends on define.c altime.pas depends on define.c define.c depends on nothing keytypes.def depends on nothing
I'm not able to create a makefile. Especially the placement in the src directory produces problems. I get dependency problems all the time.
use the option --unit-path=src to the gpc (or gp) compiler.
BTW: do you use the automake facility of gpc ? In principle you never need to write a makefile for gpc, compiling with gp pallegro.pas --automake -unit-path=src (and some other options e.g. -O3 -g --unit-destination-path=...) if pallegro is your main as I suppose, solves all dependencies problems. Have you structured your program with uses or import clauses in pascal programs and units, and including {$L define.c} {$L keytypes.def} and the like in the pascal source. You seem to have some practice of C programming, and have only an occasional job to do in pascal. Is that true ? Doing C-in-pascal programming is a common, but inefficient, mistake in that case.
Maurice