FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.

» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

LinkBack Thread Tools
Old 08-23-2010, 09:01 PM
Sebastian Pipping
Default Making a Makefile respect custom CFLAGS


I assume this Makefile to work with any non-GNU make:

CFLAGS=`sdl-config --cflags` -Wall -Wextra
LDFLAGS=`sdl-config --libs`
OBJ=tron.o pixel.o

.PHONY: clean run

tron: $(OBJ)

run: tron

rm -f *.o tron

Now how would we fix this to respect custom CFLAGS (and LDFLAGS) in a
way that does not require GNU make (i.e. simply-expanded variables):

"[Recursively-expanded variables are] the only sort supported
by other versions of make". [1]

Any proposals for a generic solution that is upstream-suitable?
While the Makefile presented here is not likely to go into the tree I
had similar cases before so I felt like bringing this up. Thanks!



[1] http://www.gnu.org/software/make/manual/make.html#Flavors

Thread Tools

All times are GMT. The time now is 04:59 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org