LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-06-2004, 07:48 PM   #1
chunlee
Member
 
Registered: Jun 2004
Location: london
Distribution: gentoo
Posts: 114

Rep: Reputation: 15
reuse Makefile on different .c?


hi there:

i have just figured out how to do a simple Makefile but got this question. how would i write a makefile that can be reused by several .c files? what i have now is:

COMPILER = gcc
CCFLAGS = -lm
myprogram: byteorder.c
${COMPILER} ${CCFLAGS} -o byteorder2 byteorder.c

clean:
rm -rf *.o a.out

i want both "buteorder.c" and "byteorder" to be a variable, so that it can be used by other .c files.

cheers

CHUN
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to get (makefile -f makefile )output into the textview widget in Pygtk sailu_mvn Programming 3 02-28-2005 03:57 AM
disallow password reuse cambie Linux - Security 0 11-29-2004 01:47 PM
generate Makefile from Makefile.in without calling ./configure ? chris78 Programming 2 05-02-2004 12:23 PM
Cannot reuse CD-RW after first burn lansman Linux - Newbie 2 11-15-2003 03:14 PM
Force outbound reply traffic to reuse inbound non-gw NIC? Jon- Linux - Networking 2 03-05-2002 04:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration