Subject: best way to add -O if no optimization is already defined?
To: None <tech-pkg@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 02/09/2005 20:00:17
What is the correct nbmake or pkgsrc way to add -O to CFLAGS only if no
optimization (like -O2) is not defined?

I guess CCOPTS, CPPFLAGS and CFLAGS would need to be checked and then if
not set then add -O to CFLAGS.

(I need this for libdv which requires at least -O. No problem on NetBSD
because of /usr/share/mk/sys.mk.)

 Jeremy C. Reed

 	  	 	 BSD News, BSD tutorials, BSD links
	  	 	 http://www.bsdnewsletter.com/