Re: Setting up MAKE file for Postgres and C++/Newbie question

From: "Lee Crampton" <lee(at)avbrief(dot)com>
To: pgsql-hackers(at)postgresql(dot)org(dot)pgsql-general(at)postgresql(dot)org
Subject: Re: Setting up MAKE file for Postgres and C++/Newbie question
Date: 2001-11-25 11:54:20
Message-ID: o_4M7.9029$i37.1242397@news6-win.server.ntlworld.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

A make file can be very simple indeed. These days makefiles have become
almost incomprehensible to all but a few!
If you don't want to be flexible and portable in the extreme, a simple
makefile for the current directory for any project goes like this:
--------------------------------------
INC="/pathFor/Other/Includes"

foo : foo.o
gcc -o foo foo.o
foo.o : foo.c
gcc -c foo.c -I $(INC);
--------------------------------------
Some years ago I wrote a program makemake which created makefiles based on
the contents of the current dir.
It was for a DOS based system but should work anywhere (with perhaps a
couple of tweeks).
I will see if I can dig it out.
Hope this helps.
Lee Crampton

<shield123321(at)hotmail(dot)com> wrote in message
news:0OtL7(dot)43114$gQ1(dot)17272737(at)news1(dot)elmhst1(dot)il(dot)home(dot)com(dot)(dot)(dot)
> I've found, compiled and tested the libpq++ c++ program examples. I've
even
> modified them to work with my database. Now I want to take an existing
> program written in c++ and add the postgres classes. I also want to do
this
> in my working directory, not the samples directory. The make file with
the
> examples is pretty intense. Does anyone have a simpler version that will
> set the appropriate paths for the includes? I naturally want to use the
> header files included with postgres, not copy them around.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter Pilsl 2001-11-25 14:28:57 Re: anyone knows about pam_pgsql ?
Previous Message charles 2001-11-25 07:25:14 how to reduce checkpoint time?

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-11-25 17:13:42 Re: Security note: MS SQL is current worm vector
Previous Message Lincoln Yeoh 2001-11-25 08:35:52 Re: Security note: MS SQL is current worm vector