[geeks] UNIX development and makefile discussion
Mouse
mouse at Rodents-Montreal.ORG
Thu Aug 15 16:12:37 CDT 2013
> Is there no way to specify an object file search path?
In general, my experience is that no, there isn't.
You can sometimes get a similar effect with a bit of Makefile hackery,
as in
OBJS = a.o b.o c.o d.o libx.o liby.o libz.o
LINKOBJS =
.for o in $(OBJS)
.if exists($o)
LINKOBJS += $o
.elif exists(../lib/$o)
LINKOBJS += ../lib/$o
.else
...hmm, is there a .error?...
.endif
.endfor
...use $(LINKOBJS) in the link...
Of course, this is limited. But it may not be entirely ludicrous in
some cases.
Mouse
More information about the geeks
mailing list