RE: makefile help

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

 



Hi Rahul,

Let u are compiling the file ./hello.c and u have a file included from ./include/hello.h.

A simple Makefile contais the followings. It wil create an executable 'hello' in the current directory.
  
1. CC=gcc
2. INCLUDE_DIR=./include
3. CFLAGS=I$(INCLUDE_DIR)
4. hello:hello.c
5. gcc -c -$(CFLAGS) hello.c -o hello

For more details download some small utilities and analyze its Makefile.
Reading some small turtorial will also helpful.

rgrds
Ashish Kumar verma

 

-----Original Message-----
From: kernelnewbies-bounce@xxxxxxxxxxxx
[mailto:kernelnewbies-bounce@xxxxxxxxxxxx]On Behalf Of Rahul T
Sent: Monday, July 11, 2005 8:19 PM
To: kernelnewbies@xxxxxxxxxxxx
Subject: makefile help


hi all,
  can anyone help me in writing a Makefile. 
 There are many sites, but they don't throw any light for a beginner
 plz help.

 thanks in advance
 
regards,
  rahul

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux