Re: Setting up MAKE file for Postgres and C++/Newbie question - Mailing list pgsql-hackers

From Lee Crampton
Subject Re: Setting up MAKE file for Postgres and C++/Newbie question
Date
Msg-id o_4M7.9029$i37.1242397@news6-win.server.ntlworld.com
Whole thread Raw
In response to Setting up MAKE file for Postgres and C++/Newbie question  (shield123321@hotmail.com)
List 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@hotmail.com> wrote in message
news:0OtL7.43114$gQ1.17272737@news1.elmhst1.il.home.com...
> 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.



pgsql-hackers by date:

Previous
From: shield123321@hotmail.com
Date:
Subject: Setting up MAKE file for Postgres and C++/Newbie question
Next
From: Stephan Szabo
Date:
Subject: Re: WAS: [Fwd: PostgreSQL new commands proposal]