* makefile error
@ 2006-05-11 19:01 Parikshat Dubey
2006-05-11 19:16 ` Daniel Llorens del Río
0 siblings, 1 reply; 4+ messages in thread
From: Parikshat Dubey @ 2006-05-11 19:01 UTC (permalink / raw)
To: gcc-help
Hi All,
I am making a makefile as following:
/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*
/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*
CC = /usr/sfw/bin/g++
INCLUDE = -I/usr/local/include/directfb \ #
-I/usr/local/include/direct-internal \
-I/usr/include \
-I../include
LD = $(CC)
LDFLAGS =
CCFLAGS = -D_REENTRANT \
-D_GNU_SOURCE \
-O2 \
-g -Wall\
LIBS = -lz \
-lpthread \
-ldirectfb \
-lfusion \
-ldirect \
-ldl \
-lfbclient \
-lm \
-g \
-lpam \
-llibs
OBJS = NM.o \
File.o \
Queue.o
NM.o:NM.c File.h Queue.h header.h
$(CC) -c NM.c $(CFLAGS) $(INCLUDE) $(LIBS)
File.o:File.c File.h
$(CC) -c File.c $(CFLAGS) $(INCLUDE) $(LIBS)
Queue.o:Queue.c Queue.h header.h
$(CC) -c Queue.c $(CFLAGS) $(INCLUDE) $(LIBS)
#all:nodemanager
nodemanager:$(OBJS)
$(LD) $(LDFLAGS) $(CFLAGS) $(OBJS) $(INCLUDE) $(LIBS) -o nodemanager
clean:rm *.o nodemanager
/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*
/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*
i am getting the following errors:
/usr/sfw/bin/g++ -c NM.c -I/usr/local/include/directfb
-I/usr/local/include/direct-internal -I/usr/include -I../include
-I/usr/sfw/lib/ -lz -lpthread -ldirectfb -lfusion -ldirect -ldl -lfbclient
-lm -g -lpam -llibs
g++: -lz: linker input file unused because linking not done
g++: -lpthread: linker input file unused because linking not done
g++: -ldirectfb: linker input file unused because linking not done
g++: -lfusion: linker input file unused because linking not done
g++: -ldirect: linker input file unused because linking not done
g++: -ldl: linker input file unused because linking not done
g++: -lfbclient: linker input file unused because linking not done
g++: -lm: linker input file unused because linking not done
g++: -lpam: linker input file unused because linking not done
g++: -llibs: linker input file unused because linking not done
I went to gcc.gnu.org and got someinputs also e.g. giving --llibs option
also but after that its giving :
usr/sfw/bin/g++ -c NM.c -I/usr/local/include/directfb
-I/usr/local/include/direct-internal -I/usr/include -I../include
-I/usr/sfw/lib/ -lz -lpthread -ldirectfb -lfusion -ldirect -ldl -lfbclient
-lm -g -lpam -llibs.
the above mentioned source files are simple sourcr files and having sockets
and threads used. pLese help me out.I am in great trouble.I think i donot
have the required libraries.
_________________________________________________________________
Sexy, sultry, sensuous. - see why Bipasha Basu is all that and more. Try MSN
Search http://server1.msn.co.in/Profile/bipashabasu.asp
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: makefile error
2006-05-11 19:01 makefile error Parikshat Dubey
@ 2006-05-11 19:16 ` Daniel Llorens del Río
2006-05-13 8:14 ` Makefile Issue Parikshat Dubey
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Llorens del Río @ 2006-05-11 19:16 UTC (permalink / raw)
To: gcc-help; +Cc: Parikshat Dubey
On 11 May, 2006, at 21:00, Parikshat Dubey wrote:
> LIBS = -lz \
> -lpthread \
> -ldirectfb \
> -lfusion \
> -ldirect \
> -ldl \
> -lfbclient \
> -lm \
> -g \
> -lpam \
> -llibs
>
> OBJS = NM.o \
> File.o \
> Queue.o
>
> NM.o:NM.c File.h Queue.h header.h
> $(CC) -c NM.c $(CFLAGS) $(INCLUDE) $(LIBS)
> File.o:File.c File.h
> $(CC) -c File.c $(CFLAGS) $(INCLUDE) $(LIBS)
> Queue.o:Queue.c Queue.h header.h
> $(CC) -c Queue.c $(CFLAGS) $(INCLUDE) $(LIBS)
> #all:nodemanager
> nodemanager:$(OBJS)
> $(LD) $(LDFLAGS) $(CFLAGS) $(OBJS) $(INCLUDE) $(LIBS) -o nodemanager
> clean:rm *.o nodemanager
> i am getting the following errors:
> /usr/sfw/bin/g++ -c NM.c -I/usr/local/include/directfb -I/usr/
> local/include/direct-internal -I/usr/include -I../include -I/usr/
> sfw/lib/ -lz -lpthread -ldirectfb -lfusion -ldirect -ldl -lfbclient
> -lm -g -lpam -llibs
> g++: -lz: linker input file unused because linking not done
> g++: -lpthread: linker input file unused because linking not done
> g++: -ldirectfb: linker input file unused because linking not done
> g++: -lfusion: linker input file unused because linking not done
> g++: -ldirect: linker input file unused because linking not done
> g++: -ldl: linker input file unused because linking not done
> g++: -lfbclient: linker input file unused because linking not done
> g++: -lm: linker input file unused because linking not done
> g++: -lpam: linker input file unused because linking not done
> g++: -llibs: linker input file unused because linking not done
Take the $(LIBS) out of these lines:
> NM.o:NM.c File.h Queue.h header.h
> $(CC) -c NM.c $(CFLAGS) $(INCLUDE) $(LIBS)
> File.o:File.c File.h
> $(CC) -c File.c $(CFLAGS) $(INCLUDE) $(LIBS)
> Queue.o:Queue.c Queue.h header.h
> $(CC) -c Queue.c $(CFLAGS) $(INCLUDE) $(LIBS)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Makefile Issue
2006-05-11 19:16 ` Daniel Llorens del Río
@ 2006-05-13 8:14 ` Parikshat Dubey
2006-05-13 11:47 ` Perry Smith
0 siblings, 1 reply; 4+ messages in thread
From: Parikshat Dubey @ 2006-05-13 8:14 UTC (permalink / raw)
To: gcc-help, daniel.llorensdelrio
Hi All!
I am stuck with one big problem as i have to spawn seven modules.
Module1,Module2,Module3,Module4,Module5,Module6,Module7.That is all these
seven modules are running on one node or system.There is one more module you
can name it 'Spawn Module' which will spawn all the seven modules i.e. spawn
module will start all these modules. I am stuck .
I donot know what to do?Whether to write separate make file for each module
from module 1 to module 7
and make a separate make file for spawn module which will use all the makes
of module 1 to module 7(I know how to write makefile but I donot know how to
use all the separate makes for each module to make one final makefile if
this is the case.)
Or
to write only one makefile and no need of making separate makefiles.
Can any body help me out.I need the solution as early as possible as things
have halted for me right now.I will be really thankful and grateful if
somebody will help me out.
ThanksandRegards
ParikshatDubey
_________________________________________________________________
Get Marriage Proposals by Email. Join FREE!
http://www.shaadi.com/matrimonial-banners/landingpage-jun06.php?ptnr=msnhottag
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Makefile Issue
2006-05-13 8:14 ` Makefile Issue Parikshat Dubey
@ 2006-05-13 11:47 ` Perry Smith
0 siblings, 0 replies; 4+ messages in thread
From: Perry Smith @ 2006-05-13 11:47 UTC (permalink / raw)
To: Parikshat Dubey; +Cc: gcc-help, daniel.llorensdelrio
Well, of course, you could do any of those approaches. None of them
will be significantly different.
I would assume that to make Modules 1-7, the process is very
similar. If you go the separate makefile route, I would put the
common things in a common make file and then include it in the
module1-7 makefiles. (It does not need to say "makefile" -- it could
be named anything.)
The top level makefile can invoke make with the other makefiles using
the -f option: make -f module1.mk for example. (the .mk suffix is
just something I made up -- its not significant to make.) So you
would have seven of those lines in the top level makefile.
I would try hard to have one makefile if that is plausible. The
reason is that for a change to a file that is not common to all the
modules, only the minimum amount of work will be done to get things
recompiled. But, the separate calls to make will not cost time much
either.
With GNU's make, you can have target specific variables. So, for
example, the list of object files needed for each module can be
specified all in the same makefile using the same name for the
macro. Then the macro that does the link will pick the target
specific value when it does the link for each particular target
(module in this case).
For clarity, you could have these put into separate files and then
include them into one master makefile. Or, as I mentioned before,
you could have the master makefile invoke make separately for each
module.
Good luck,
Perry
On May 13, 2006, at 3:14 AM, Parikshat Dubey wrote:
> Hi All!
>
> I am stuck with one big problem as i have to spawn seven modules.
>
> Module1,Module2,Module3,Module4,Module5,Module6,Module7.That is all
> these seven modules are running on one node or system.There is one
> more module you can name it 'Spawn Module' which will spawn all the
> seven modules i.e. spawn module will start all these modules. I am
> stuck .
>
> I donot know what to do?Whether to write separate make file for
> each module from module 1 to module 7
> and make a separate make file for spawn module which will use all
> the makes of module 1 to module 7(I know how to write makefile but
> I donot know how to use all the separate makes for each module to
> make one final makefile if this is the case.)
> Or
> to write only one makefile and no need of making separate makefiles.
>
> Can any body help me out.I need the solution as early as possible
> as things have halted for me right now.I will be really thankful
> and grateful if somebody will help me out.
>
> ThanksandRegards
> ParikshatDubey
>
> _________________________________________________________________
> Get Marriage Proposals by Email. Join FREE! http://www.shaadi.com/
> matrimonial-banners/landingpage-jun06.php?ptnr=msnhottag
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-05-13 11:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-11 19:01 makefile error Parikshat Dubey
2006-05-11 19:16 ` Daniel Llorens del Río
2006-05-13 8:14 ` Makefile Issue Parikshat Dubey
2006-05-13 11:47 ` Perry Smith
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).