Closed AndrewStoneOpenClovis closed 11 years ago
Hi,
Please fix the following bugs in make-common.mk:
$(foreach lib,$(ALL_STATIC_LIB_NAMES), \
$(shell $(ECHO) "$(LIB_DIR)/$(lib).a: $(addprefix $(OBJ_DIR)/,$(subst .c,.o,$(subst .cpp,.o,$(notdir $(SRCFILES$(lib):.c=.o)))))" >> $(INC_DIR)/libs.mk\
&& $(ECHO) -e '\t$$(call cmd,ar)' >> $(INC_DIR)/libs.mk))
Actually there are several places in your make files that handle only .c and not .cpp . I guess you should go over all places and fix them. Also, I believe you should handle all possible file extensions such as .C, .cxx, .CPP or just decide what is the subset you support.
Thanks, Hilla.
The issue is compiling c++ file of a component inside a sub-directory. I'm trying to do the following: create sub-directory under the component directory, put c++ file (either .C or .cpp, it doesn't matter), and in the component makefile to make the changes: BUILD_CPLUSPLUS=1 And SRC_FILES += $(wildcard/file.C)
It doesn't work ! the makefile tries to find the c++ file in the component directory and not in the sub-directory. This works perfectly for c files, the problem is only with c++ file. If I put the c++ file in the component directory (and not in sub directory) then there is no problem.
found the problem. It is in make-common.mk: At the end of the file you have: vpath %.c $(vpath_list) vpath %.cxx $(vpath_list)
And this line is missing for .C and .cpp. When I add those lines: vpath %.C $(vpath_list) vpath %.cpp $(vpath_list)