DragonFly BSD
DragonFly users List (threaded) for 2012-01
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

[Solved] Re: newbie: makefile question


From: Michael Sanders <bluelamp100@xxxxxxxxx>
Date: Fri, 27 Jan 2012 20:31:38 -0600

On Fri, Jan 27, 2012 at 12:21 PM, Michael Sanders <bluelamp100@gmail.com> wrote:

> Hi folks, question...
>
> Attempting to compile some X11 code, but seem to be having problems
> with the linker paths in the makefile. Hoping someone could advise me
> on this issue. (libs/includes/headers are installed). I cant seem to find
> the correct path (coming from a Linux world here...).
>
> Here's the portion in question before modification:
>
> X11INC = /usr/include/X11
> X11LIB = /usr/lib/X11
>
> INCS = -I. -I/usr/include -I${X11INC}
> LIBS = -L/usr/lib -lc -L${X11LIB} -lX11
>
> And the same portion after modification:
>
> X11INC = /usr/X11R6/include
> X11LIB = /usr/X11R6/lib
>
> INCS = -I. -I/usr/include -I${X11INC}
> LIBS = -L/usr/lib -lc -L${X11LIB} -lX11

1st, my corrected & working snippet:

X11INC = /usr/pkg/include
X11LIB = /usr/pkg/lib/

INCS = -I. -I/usr/include -I${X11INC}
LIBS = -L/usr/lib -lc -L${X11LIB} -lX1

I obtained the correct paths via the following two invocations:

pkg-config --cflags x11

pkg-config --libs x11

Heck, one could even roll these up in the makefile using back-quotes:

@echo `pkg-config --libs x11`

Further reading: pkg-config(1)

Welp, back to reading for me, hope someone benefits from it.

-- 
Later on,
Mike

http://www.topcat.hypermart.net/index.html



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]