X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/8e8c6cdddc6af0a1e7ebcd7fa947395b66bf1103..2501ff5278198b17c195536d0953cbb40d1a5d3b:/projects/sgauth/Makefile diff --git a/projects/sgauth/Makefile b/projects/sgauth/Makefile index 5565199b..99cd0e47 100644 --- a/projects/sgauth/Makefile +++ b/projects/sgauth/Makefile @@ -87,8 +87,15 @@ endif deps: $(SRCS) ../../Makefile.conf sgauth.css $(MAKE) -C $(DIR_LIBSRC) @>deps ;\ - ./make_css.sh + ./make_css.sh ;\ for file in $(SRCS); do\ - echo "`$(CC) $(CXXFLAGS) -MM $$file` Makefile" >> deps ;\ - printf '%b\n' '\t$$(CC) -c $$< $(CXXFLAGS)' >> deps ;\ + echo "$$file" | grep ".c$$" > /dev/null;\ + if [ $$? -eq 0 ];\ + then\ + echo "`$(CC) $(CFLAGS) -MM $$file` Makefile" >> deps ;\ + printf '%b\n' '\t$$(CC) $(CFLAGS) -c $$<' >> deps ;\ + else\ + echo "`$(CXX) $(CXXFLAGS) -MM $$file` Makefile" >> deps ;\ + printf '%b\n' '\t$$(CXX) $(CXXFLAGS) -c $$<' >> deps ;\ + fi;\ done