Makefile need love too

Lots of discussion has take place in #320 

New make build system.  This **REQURES** **gmake** to work and with this we have pushed almost all the logic about build the code into a single file src/Makefile 

* The Makefile is designed for developers other people that like playing with pointy dangerous things. 
* install.sh is designed for users and should be the supported method for install. 

I am sure it will need more work and I am creating the Pull Request to get more people to try it out and report back.  


I should play with it a ms I tried it this was and could not get it working. But I changed other things too. 



> On Oct 6, 2014, at 5:55 AM, cgzones <notifications@github.com> wrote:
> 
> In src/Makefile:
> 
> > +
> > +uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
> > +
> > +
> > +
> > +
> > +
> > +
> > +EXTERNAL_JSON=external/cJSON/
> > +EXTERNAL_LUA=external/lua/
> > +EXTERNAL_ZLIB=external/zlib-1.2.8/
> > +LUA_PLAT=posix
> > +MAXAGENTS?=2048
> > +# XXX Becareful NO EXTRA Spaces here
> > +PREFIX?=/var/ossec
> > +export PREFIX
> Ok, but the export keyword in Makefiles does not work that way: https://www.gnu.org/software/make/manual/html_node/Variables_002fRecursion.html
> 
> —
> Reply to this email directly or view it on GitHub.