Loading ...
Sorry, an error occurred while loading the content.

52527Re: [linux] makefile/c linkage question

Expand Messages
  • ed
    Sep 1, 2007
    • 0 Attachment
      On Sat, 1 Sep 2007 05:19:43 +0000
      Michael Kjorling <michael@...> wrote:

      > Well, there's gcc's -D switch (define macro) that would seem to do
      > just about exactly what you are looking for. That and variable
      > expansion could go a long way if you don't want an full-blown autoconf
      > setup.

      Nothing bores me more than watching configure scripts run through the
      same stuff time and time again!

      > Something like:
      > DATABASE_MYSQL=-DMYSQL -lmysql
      > DATABASE_PGSQL=-DPGSQL -lpostgres
      > ...
      > DATABASE=$(DATABASE_whichever)
      > ...
      > gcc $(DATABASE) ...
      > This would let the user just fill in the "whichever" part, and the
      > appropriate options would be passed to the compiler and linker.

      Thanks very much, this does the trick nicely, that's just what I was
      looking for but could not see in the man page :-)

      The HSSI to www.brokenmachine.com is wigging because of a trailing
      space in /etc/netgroups. Microsoft is downloading warez & porn.
      :: http://www.s5h.net/ :: http://www.s5h.net/gpg

      [Non-text portions of this message have been removed]
    • Show all 3 messages in this topic