C Board  

Go Back   C Board > Platform Specific Boards > Linux Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 09-01-2002, 06:27 AM   #1
Skarr
Guest
 
Posts: n/a
BSD make and GNU make problem

Hi

I'm working on a FreeBSD platform, but I'd like to use GNU make.
I know that CFLAGS works on BSD make, but how do I specify gcc flags in GNU make?

Thanks

/Skarr
  Reply With Quote
Old 09-01-2002, 08:33 AM   #2
Registered User
 
Join Date: Aug 2001
Posts: 202
I've got the GNU make manual in front of me, and it lists CFLAGS as one of the variables used in built in rules. Not that I've personally used this feature, but you might be able to use it the same way as your BSD version.

starX
www.axisoftime.com
starX is offline   Reply With Quote
Old 09-01-2002, 09:24 AM   #3
Skarr
Guest
 
Posts: n/a
Hmm, doesn't work for me.
  Reply With Quote
Old 09-09-2002, 11:21 AM   #4
Registered User
 
Join Date: Jul 2002
Posts: 29
Could you post a simple Makefile where it works with gmake?
__________________
I like traffic lights. I like traffic lights. I like traffic lights, but only when they're green.
Skarr is offline   Reply With Quote
Old 09-10-2002, 12:31 PM   #5
Registered User
 
Join Date: Aug 2001
Posts: 202
This from page 101 of the manual:

Code:
foo : foo.o bar.o
        cc -o foo foo.o bar.o $(CFLAGS) $(LDFLAGS)
An example on setting the CFLAGS variable specifically is on page 36:

Code:
CFLAGS = $(include_dirs) -0
include_dirs = -Ifoo -Ibar
Hope this helps you somewhat. Goodluck.

starX
www.axisoftime.com
starX is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help me understand GNU Make please yougene C Programming 6 06-14-2009 07:36 PM
Establishing 'make clean' with GNU make Jesdisciple C Programming 9 04-11-2009 09:10 AM
GNU make - generating dynamic dependencies OriginalCopy Linux Programming 0 05-15-2008 10:41 AM
how gnu make tells if file's been changed? thinhare C Programming 2 03-19-2008 03:10 AM
How to make console Mode apps like 'GNU less'? gibsosmat C Programming 4 10-31-2007 07:33 AM


All times are GMT -6. The time now is 01:13 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22