Hi All,
I'm working with a project that has a modest tree structure. The *.o
files are currently being placed next to their *.cpp counterparts. I
would like to move them to an obj/ directory, maintaining the same
structure.
I tried:
CODECSRCS = codec/HTMLCodec.cpp \
....
CRYPTOSRCS = crypto/MessageDigest.cpp \
....
CODECOBJS = $(addprefix,obj/,$(CODECSRCS))
CRYPTOOBJS = $(addprefix,obj/,$(CRYPTOSRCS))
The problem is that our CPP build rule is getting in the way ('don't
know how to make X'):
.cpp.o:
$(CXX) $(CXXFLAGS) $(INCLUDES) -fpic -c $< -o $@
If we change the build rule to output to objects, final linking is
blowing up (even with -L./obj):
.cpp.o:
$(CXX) $(CXXFLAGS) $(INCLUDES) -fpic -c $< -o obj/$@
Any recommendations on the best way to proceed would be appreciated.
Jeff
_______________________________________________
Help-make mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-make