Fix with BSD sed
No need to generate src/mod/mod.mk
Simplify build by moving common target rule to build/build.mk
Remove redundnat depcop, already set in mod.mk
Further simply build by removing src/mod/mod.mk
Clean should only call clean, not distclean
Get rid of gmake-ism ifeq
Remove cc1plus and just preprocess first into an .i file

The cc1plus was clever but does not work with clang
Use simpler [C ] for output
Add .cpp rules
Simplify cleanup
Use basename.i and not target.c.i
Use -Qunused-arguments to hide -I unused warnings with clang
Merge branch 'maint'

* maint:
  Use -Qunused-arguments to hide -I unused warnings with clang
  Use basename.i and not target.c.i
  Simplify cleanup
  Add .cpp rules
  Use simpler [C ] for output
  Remove cc1plus and just preprocess first into an .i file
  Get rid of gmake-ism ifeq
  Clean should only call clean, not distclean
  Further simply build by removing src/mod/mod.mk
  Remove redundnat depcop, already set in mod.mk
  Simplify build by moving common target rule to build/build.mk
  No need to generate src/mod/mod.mk
  Fix with BSD sed
Merge branch 'master' into next

* master:
  Use -Qunused-arguments to hide -I unused warnings with clang
  Use basename.i and not target.c.i
  Simplify cleanup
  Add .cpp rules
  Use simpler [C ] for output
  Remove cc1plus and just preprocess first into an .i file
  Get rid of gmake-ism ifeq
  Clean should only call clean, not distclean
  Further simply build by removing src/mod/mod.mk
  Remove redundnat depcop, already set in mod.mk
  Simplify build by moving common target rule to build/build.mk
  No need to generate src/mod/mod.mk
  Fix with BSD sed