public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Parikshat Dubey" <parikshatdubey@hotmail.com>
To: gcc-help@gcc.gnu.org, gcc-announce-get.123_145@gcc.gnu.org,
	bug-make@gnu.org,
	gcc-announce-digest-sc.1147763497.pfpdlibggnnliapbalkg-parikshatdubey=hotmail.com@gcc.gnu.org,
	brian.budge@gmail.com, gcc-announce-help@gcc.gnu.org,
	gcc-announce-info@gcc.gnu.org,
	gcc-announce-thread.12345@gcc.gnu.org,
	gcc-announce-return-@gcc.gnu.org, vivek1717@gmail.com,
	pedz@easesoftware.com, daniel.llorensdelrio@epfl.ch,
	gcc-announce-faq@gcc.gnu.org, jg@jguk.org
Subject: Makefile issue
Date: Mon, 03 Jul 2006 16:34:00 -0000	[thread overview]
Message-ID: <BAY121-F13B95DC24B3AEF6B94563CCF700@phx.gbl> (raw)

Hi folks!

Friends I am preparing a make file but its giving target not needed by 
a1.c.target a1.o stop.
Here is the procedure
CC=/usr/sfw/bin/gcc
CFLAGS=-g -Wall
SRC=/Module/src
INCLUDE=/usr/include \
              /Module/header
              //path for header files gtk,gdk,atk,pango etc.
LIBS       =lsocket \
                lnsl \
                lpthread \
               path for library packages for gtk,gdk etc.

#MODULE 1 has following files a1.c ,a2.c,a3.c and a1.h,a2.h and a3.h
#MODULE 2 has following files b1.c ,b2.c,b3.c and b1.h,b2.h,b3.h
#MODULE 3 has following files c1.c ,c2.c,c3.c and c1.h,c2.h,c3.h

#There is a top level folder called Module which contains src and header 
subfolders.
#In src subfolder contain module1,2 and 3 which contains source 
filesrespective to the module and #in /module/header contains subfolder 
module 1,2 and 3 which contain header files.
#Makefile is saved in /Module/makefile

OBJS=a1.o a2.o a3.o b1.o b2.o b3.o c1.o c2.o c3.o

a1.o:a1.c
               $(CC)  -$INCLUDE -$(CFLAGS)  -I.  -I$(SRC)  -c $<
a2.o:a2.c
               $(CC)  -$INCLUDE  -$(CFLAGS) -I.  -I$(SRC)  -c $<
a3.o:a3.c
               $(CC)  -$INCLUDE  -$(CFLAGS) -I.  -I$(SRC)  -c $<
b1.o:b1.c
               $(CC)   -$INCLUDE  -$(CFLAGS) -I.  -I$(SRC)  -c $<
b2.o:b2.c
               $(CC)  -$INCLUDE  -$(CFLAGS) -I.  -I$(SRC)  -c $<
b3.o:b3.c
               $(CC)   -$INCLUDE  -$(CFLAGS)  -I.  -I$(SRC)  -c $<
c1.o:c1.c
               $(CC)   -$INCLUDE  -$(CFLAGS) -I.  -I$(SRC)  -c $<
c2.o:c2.c
               $(CC)   -$INCLUDE  -$(CFLAGS) -I.  -I$(SRC)  -c $<
c3.o:c3.c
               $(CC)   -$INCLUDE  -$(CFLAGS) -I.  -I$(SRC)  -c $<

all:parikshit
$(CC) -$(OBJS)  -$INCLUDE  -$(CFLAGS) -$LIBS --g -o parikshit


As far as my knowledge goes '$< ' will automatically search the mentioned 
source file in the folder mentioned by SRC .for example in this case
a1.o:a1.c
               $(CC)  -$INCLUDE -$(CFLAGS)  -I.  -I$(SRC)  -c $<
'$<' will automatically search the source file in the path mentioned by 
SRC(/Module/src) macro.
i.e.above thing will automatically search source file a1.c in /Module/src/ 
Module1/a1.c

So same thing for above source files.So why target is not being made.

Please help me .I will be highly thankful if somebody will come up with 
solution or mentioning any mistake made by me.Please reply as soon as 
possible as things are being halted for me.

Regards
Parikshat Dubey

_________________________________________________________________
Sexy, sultry, sensuous. - see why Bipasha Basu is all that and more. Try MSN 
Search http://server1.msn.co.in/Profile/bipashabasu.asp

             reply	other threads:[~2006-07-03 16:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-03 16:34 Parikshat Dubey [this message]
2006-07-18 14:05 ` Dima Sorkin
  -- strict thread matches above, loose matches on Subject: below --
2006-07-20 16:31 MakeFile Issue Parikshat Dubey
2006-07-20 16:31 Parikshat Dubey
2006-07-20 16:30 Makefile Issue Parikshat Dubey
2006-05-26 10:39 Parikshat Dubey
2006-05-26 10:51 ` Brian Dessent
2006-05-19  6:29 makefile issue Parikshat Dubey
2006-05-11 19:16 makefile error Daniel Llorens del Río
2006-05-13  8:14 ` Makefile Issue Parikshat Dubey
2006-05-13 11:47   ` Perry Smith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BAY121-F13B95DC24B3AEF6B94563CCF700@phx.gbl \
    --to=parikshatdubey@hotmail.com \
    --cc=brian.budge@gmail.com \
    --cc=bug-make@gnu.org \
    --cc=daniel.llorensdelrio@epfl.ch \
    --cc=gcc-announce-digest-sc.1147763497.pfpdlibggnnliapbalkg-parikshatdubey=hotmail.com@gcc.gnu.org \
    --cc=gcc-announce-faq@gcc.gnu.org \
    --cc=gcc-announce-get.123_145@gcc.gnu.org \
    --cc=gcc-announce-help@gcc.gnu.org \
    --cc=gcc-announce-info@gcc.gnu.org \
    --cc=gcc-announce-return-@gcc.gnu.org \
    --cc=gcc-announce-thread.12345@gcc.gnu.org \
    --cc=gcc-help@gcc.gnu.org \
    --cc=jg@jguk.org \
    --cc=pedz@easesoftware.com \
    --cc=vivek1717@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).