Subject: Re: Document for doing makefile or Makefile (include)
To: Bill Studenmund <wrstuden@zembu.com>
From: Richard PLOIX <richard.ploix@fr.adp.com>
List: port-i386
Date: 05/29/2000 19:50:47
At 09:40 25/05/00 -0700, you wrote:
>On Thu, 25 May 2000, Bill Studenmund wrote:
>
>> > COPTS+=-I/usr/X11R6/include
>> 
>> No, you want CPPFLAGS+=-I/usr/X11R6/include
>> 
>> CPPFLAGS is one of the elements used to make COPTS. The difference is that
>> CPPFLAGS is also used when linting files and anywhere else the C
>> pre-processor is being used.
>
>Actually COPTS and CPPFLAGS make up CFLAGS. To quote
>/usr/share/mk/bsd.README:
>
>COPTS           Additional flags to the compiler when creating C objects. 
>                
>CPPFLAGS        Additional flags to the C pre-processor 
>                
>The pre-processor handles includes, so it needs the -I directives.
>
>Take care,
>
>Bill
>
>
>
COPTS and CPFLAGS are ok fro including.
This is ok for now.
but the new problem is for linking.
here is my makefile:
---------------------
WARNS=2
PROG=HELLO
NOMAN=noman
COPTS+=-I/usr/X11R6/include
LIBDIR+=-L/usr/X1
1R6/lib
LDFLAGS+=-lX11
.include <bsd.prog.mk>
---------------------
a this time, i can't find "XOpenDisplay", ... for linking.
I try LDFLAGS, LIBDIR, LDADD+=-lX11, ...

thank's, R.