[Queue-developers] Using solaris CC compiler option "-xM"
Brought to you by:
wkrebs
From: arthy g. <ar...@ya...> - 2007-01-12 10:38:52
|
Hello Henry Tillotson, I saw your mail about CC dependency option in queue-developers mailing list. Pls refer the following link http://sourceforge.net/mailarchive/message.php?msg_id=449223 You have specified that to generate dependencies we have to use CC as specified below. $(COMPILE) -xM $< > .deps/$(*F).pp $(COMPILE) -c $< By default I think that the -xM option assumes that all the object files are in the same directory as the output file Suppose if the object files are in a different directory than the source files then how does the -xM recoginize it?? Because when I give in my makefiel as given below, depend option works fine. $(OBJS):%.o:%.cxx $(CXX) -xM1 $(CFLAGS) $< > $*.P $(CXX) $(CFLAGS) $(@F:.o=.cxx) -o $@ -include $(SRCS:.cxx=.P) But when the object files are in a different directory as given below it does not work properly. $(OBJS):$(OUTPUT_DIR)/%.o:%.cxx $(CXX) -xM1 $(CFLAGS) $< > $(OUTPUT_DIR)/$*.P $(CXX) $(CFLAGS) $(@F:.o=.cxx) -o $@ -include $(SRCS:%.cxx=$(OUTPUT_DIR)/%.P) From what I found when -xM1 ouputs info it assumes that alll the object files are in the same directory as the source files. When I give a "make" in the source directory it displays like this. CEventQueue.o : CEventQueue.cxx CEventQueue.o : CEventQueue.h CEventQueue.o : ../../pdfcore/src//CCoQueueService.h CEventQueue.o : ../../pdfcore/src//CCoPthreadObj.h CEventQueue.o : ../../pdfcommon/src//CPdfObject.h CEventQueue.o : ../../pdfcommon/src//CPdfTrace.h CEventQueue.o : ../../pdfcommon/src//CPdfException.h CEventQueue.o : ../../pdfcommon/src//PdfType.h But actually it should refer the .o's like this. ../../build/CEventQueue.o : CEventQueue.cxx where ../../build is the OUTPUT_DIR. I found that there is no CC compiler option for adding prefix to object files. Could you tell me what to do now.??All the makefiles in our project create the .o files in a seperate directory other than the source directory. Thanks in advance, GA --------------------------------- Meet your soulmate! Yahoo! Asia presents Meetic - where millions of singles gather |