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

Re: How to build packages from tarballs without makefiles

On Mon, Apr 10, 2006 at 05:18:46PM +0100, Darren Salt wrote:
> I demand that Carlo Segre may or may not have written...
> > On Sun, 9 Apr 2006, David Liontooth wrote:
> [snip]
> >> I need a bit more help -- where do I add them to rules?
> >>   CFLAGS = -Wall -g
> >> Can I add the "Link with" line to give
> >>  CFLAGS = -Wall -g -lGLU -lGL -lXmu -lXext -lX11
> [snip]
> > BTW, a library package may not be the best thing to learn packaging.  A
> > package which produces a single executable is much easier.
> ... and, since it's a library, you *must* add -fPIC to CFLAGS.
... and to LDFLAGS also:

|      -shared
|          Produce a shared object which can then be linked with other objects
|          to form an executable.  Not all systems support this option.  For
|          predictable results, you must also specify the same set of options
|          that were used to generate code (-fpic, -fPIC, or model suboptions)
|          when you specify this option.[1]

(assuming it is a shared library of course)


Reply to: