Hi all, Is it possible to specify the output directory? Something like an OUTPUTDIR() directive. This would make it easier to set/unset other options in a global makefile. Now you have to add a complete filename to the directives if the output directory is different. Setting/unsetting only PRINT or PREPRINTONLY for example (without a path+filename) would be easier to maintain in a makefile. Regards, Joost Leeuwesteijn
When you specify the object file (OBJECT directive) including a pathname, I expected that path to be used for all related output files as well (.lst, .i, etc.) but that doesn't seem to work... -- Joost Leeuwesteijn
"Now you have to add a complete filename to the directives if the output directory is different." You can easily set a symbol in the makefile, and get the makefile to build the full path, eg, $(OUT_DIR)\$(TARGET).lst "would be easier to maintain in a makefile." I think having the makefile define the symbols would be easier to maintain! You could have stuff like this:
#------------------------------------------------------------------------------ # Path for code C files #------------------------------------------------------------------------------ PATH_C = ../../src #------------------------------------------------------------------------------ # Path for include C files #------------------------------------------------------------------------------ PATH_H = ../../inc ../../itf \
You can easily set a symbol in the makefile, and get the makefile to build the full path, eg, $(OUT_DIR)\$(TARGET).lst Yes, that's what I'm using now. I think having the makefile define the symbols would be easier to maintain! I think having -no symbols- (or make variables) at all would be much easier to maintain :-) Only specify
$(CC) OBJECT($@) $(CFLAGS)
CFLAGS += PRINT CFLAGS += PREPRINT