mattias/spikboll wrote:
Hello, I have written a small app for school that uses a small module (written by me) and crt. It compiles fine with --automake, but I need to have a Makefile. My problem is that I don't know how to tell make to find crt.pas & co.
should I move crt.pas, gpc.pas and all files they depend on into the build directory?
No.
`gpc --print-file-name=units' will output the directory name (igf installed correctly). In GNU make, something like this should work:
GPC_UNIT_PATH:=$(shell $(PC) $(PFLAGS) --print-file-name=units)
If it must work with other makes, I don't know what will work -- in the worst case, a recursive make invocation might do, something like:
all: $(MAKE) GPC_UNIT_PATH=`$(PC) $(PFLAGS) --print-file-name=units` progs
Of course, you could also put `gpc --automake' into the Makefile if that's "allowed" ...
Frank