Hi Maxim and Bart

Thanks very much for reviewing my makefile. Your suggestion of an extra command
did indeed solve my problem. That's great.

My reason for not replying sooner is that I am testing other parts of the 
makefile.

What I sent was actually a simplified version. The real version had:

.PHONY : release 
        release : $(OBJDIR_R)/$(EXEFILE)
<snip>
$(OBJDIR_R)/$(EXEFILE) : $(ARCHIVES_R)
        $(CXX) -o $(OBJDIR_R)/$(EXEFILE) -ldl 
-Wl,-whole-archive,-export-dynamic $(ARCHIVES_R) $(EXTRA_LIBS_R)
<snip>
$(ARCHIVES_R) $(ARCHIVES_D) : versioninfo $(STATIC_LIBS) $(DYNAMIC_LIBS)

Now $(ARCHIVES_R) contains the paths of the static libraries. I can see
no reason why this should depend on $(DYNAMIC_LIBS) (some code of the
program is linked in dynamic libraries so that we can selectively load it).
So I think better rules would be:

.PHONY : release 
        release : $(OBJDIR_R)/$(EXEFILE) $(DYNAMIC_LIBS) versioninfo
<snip>
$(OBJDIR_R)/$(EXEFILE) : $(ARCHIVES_R)
        $(CXX) -o $(OBJDIR_R)/$(EXEFILE) -ldl 
-Wl,-whole-archive,-export-dynamic $(ARCHIVES_R) $(EXTRA_LIBS_R)
<snip>
$(ARCHIVES_R) $(ARCHIVES_D) : $(STATIC_LIBS)

(versionInfo is a small utility that we also want built.

So I'm now testing this. Please let me know if you can see anything that is 
obviously wrong.

Best regards

David




_______________________________________________
Help-make mailing list
Help-make@gnu.org
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to