X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/8d05adbce3fd922590e8e3edf674cc57773d821e..f1f23b0047bf11eb8f904f4da4e5cc2bb236bf06:/stglibs/Makefile.in diff --git a/stglibs/Makefile.in b/stglibs/Makefile.in index d86cac3c..a016fed5 100644 --- a/stglibs/Makefile.in +++ b/stglibs/Makefile.in @@ -64,12 +64,15 @@ endif deps: $(SRCS) ../../Makefile.conf @>deps ;\ - for file in `echo "$(SRCS)" | grep ".c$$"`; do\ - echo "`$(CC) $(CFLAGS) $(SEARCH_DIRS) $(DEFS) -MM $$file` Makefile ../../Makefile.conf" >> deps ;\ - echo -e '\t$$(CC) $(CFLAGS) $(SEARCH_DIRS) $(DEFS) -c $$<' >> deps ;\ - done;\ - for file in `echo "$(SRCS)" | grep ".cpp$$"`; do\ - echo "`$(CXX) $(CXXFLAGS) $(SEARCH_DIRS) $(DEFS) -MM $$file` Makefile ../../Makefile.conf" >> deps ;\ - echo -e '\t$$(CXX) $(CXXFLAGS) $(SEARCH_DIRS) $(DEFS) -c $$<' >> deps ;\ - done\ + for file in $(SRCS); do\ + echo "$$file" | grep ".c$$" > /dev/null;\ + if [ $$? == 0 ];\ + then\ + echo "`$(CC) $(CFLAGS) $(SEARCH_DIRS) $(DEFS) -MM $$file` Makefile ../../Makefile.conf" >> deps ;\ + echo -e '\t$$(CC) $(CFLAGS) $(SEARCH_DIRS) $(DEFS) -c $$<' >> deps ;\ + else\ + echo "`$(CXX) $(CXXFLAGS) $(SEARCH_DIRS) $(DEFS) -MM $$file` Makefile ../../Makefile.conf" >> deps ;\ + echo -e '\t$$(CXX) $(CXXFLAGS) $(SEARCH_DIRS) $(DEFS) -c $$<' >> deps ;\ + fi;\ + done