[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: ieieie.... ooops



On Tue, Jun 08, 1999 at 02:10:24PM -0300, Relder Pereira dos Santos wrote:
> 
>   Yeah... my program is running well (just a school work :1P)
> 
>   But now i need to configure makefile for my teacher to compile it...
> as i am a newbie in linux developing ... i dont't really know how to do
> it???
>   Can someone help me telling me how to configure Makefile for my own
> application???
>
  I don't know your application, but usually, writing a Makefile for
a single file program is as simple as:

------------ Makefile -------------------------------->8------------
program: program.c
	gcc program.c -o program `gtk-config --cflags --libs`
---------8<---------------------------------------------------------

  And for multiple files program:

------------ Makefile --------------------------------->8-----------
program: file1.o file2.o
	gcc file1.o file2.o -o program `gtk-config --libs`

file1.o: file1.c
	gcc -c file1.c -o file1.o `gtk-config --cflags`
  
file2.o: file2.c
	gcc -c file2.c -o file2.o `gtk-config --cflags`
----------8<--------------------------------------------------------

  Hope this helps,

                     DindinX

-- 
David.Odin@bigfoot.com

Drew: Your taxes come to $320.
Stu: $320? How could it be?
Drew: Oops. Forgot the decimal point. That actually comes to $32,000.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]