Don't use beforedepend to complicate and break things.  The usual fix of putting generated source files in SRCS breaks many special cases (many dependencies had to be incomplete for ${.ALLSRC} not to give .h files that would break compiling with c++ -c). Reduce these special cases to the general case so that SRCS works normally and bsd.lib.mk handles most of the complications.  Now we only have to duplicate rules from bsd.lib.mk to add special CFLAGS in some cases.
Don't use beforedepend to complicate and break things.  The usual
fix of putting generated source files in SRCS breaks many special
cases (many dependencies had to be incomplete for ${.ALLSRC}
not to give .h files that would break compiling with c++ -c).
Reduce these special cases to the general case so that SRCS works
normally and bsd.lib.mk handles most of the complications.  Now
we only have to duplicate rules from bsd.lib.mk to add special
CFLAGS in some cases.

jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase