I am trying to parse .c, .cpp and .cc files in test.mk file for compilation. For .c and .cpp it is working fine. I want to add for .cc files but, I dont know how to add, as test.mk is written by some one.

I tried following the pattern in .c or .cpp file but it is not accepting. Can you help me out?

'$(MODULE_C_OBJECTS): $(OBJDIR)/%.o : ./%.c @-mkdir -p $(OBJDIR) 2> /dev/null $(HIDE) $(CC) $(CFLAGS) -c $(INCPATHS) -o [email protected] $<`

test.mk:315: target `xxx.cc' doesn't match the target pattern

I want this file also to be compiled.

This is similar to below link Modifying a makefile to compile .cc and .cpp files

0 Answers