- echo "`$(CC) $(CXXFLAGS) $(SEARCH_DIRS) $(DEFS) -MM -MG $$file` Makefile ../../Makefile.conf" >> deps ;\
- echo -e '\t$$(CC) $(CXXFLAGS) $(SEARCH_DIRS) $(DEFS) -c $$<' >> deps ;\
+ echo "$$file" | grep ".c$$" > /dev/null;\
+ if [ $$? -eq 0 ];\
+ then\
+ echo "`$(CC) $(CFLAGS) -MM $$file` Makefile ../../Makefile.conf" >> deps ;\
+ echo -e '\t$$(CC) $(CFLAGS) -c $$<' >> deps ;\
+ else\
+ echo "`$(CXX) $(CXXFLAGS) -MM $$file` Makefile ../../Makefile.conf" >> deps ;\
+ echo -e '\t$$(CXX) $(CXXFLAGS) -c $$<' >> deps ;\
+ fi;\