Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .SUFFIXES:
- headers := $(wildcard include/*.h)
- source := $(wildcard **/*.cpp)
- objects := ${source:.cpp=.o}
- diffs := ${source:.cpp=.diff}
- #
- run: $(objects) diff.summary
- g++ -o run $(objects)
- %.o : %.cpp
- g++ -c $< -o $@
- #
- diff.summary : $(diffs)
- cat $(diffs) | tee $@
- %.diff : %.cpp
- @diff -u $< <(clang-format $<) > $@ || true
- #
- clean :
- rm -rf run diff.summary $(objects) $(diffs)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement