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.  


Ok that is easy fix will get that out today 



> On Oct 6, 2014, at 9:02 AM, ddpbsd <notifications@github.com> wrote:
> 
> In src/Makefile:
> 
> > +logcollector/%.o: logcollector/%.c
> > +	${OSSEC_CC} ${CFLAGS} -DARGV0=\"ossec-logcollector\" -c $^ -o $@
> > +
> > +ossec-logcollector: ${os_logcollector_o} ${ossec_libs}
> > +	${OSSEC_CCBIN} ${CFLAGS} $^ ${LDFLAGS} -o $@
> > +
> > +#### remoted #########
> > +
> > +remoted_c := $(wildcard remoted/*.c)
> > +remoted_o := $(remoted_c:.c=.o)
> > +
> > +remoted/%.o: remoted/%.c
> > +	${OSSEC_CC} ${CFLAGS} -I./remoted ${ZLIB_INCLUDE} -DARGV0=\"ossec-remoted\" -c $^ -o $@
> > +
> > +ossec-remoted: ${remoted_o} ${ossec_libs} ${ZLIB_LIB}
> > +	${OSSEC_CCBIN} ${CFLAGS} ${ZLIB_INCLUDE} $^ ${LDFLAGS} -o $@
> I had to add "-pthread" to compile ossec-remoted on OpenBSD.
> Errors:
> cc -DMAX_AGENTS=2048 -DOSSECHIDS -DDEFAULTDIR=\"/var/ossec\" -DUSER=\"ossec\" -DREMUSER=\"ossecr\" -DGROUPGLOBAL=\"ossec\" -DMAILUSER=\"ossecm\" -DUSE_OPENSSL -Wall -Wextra -O2 -I./ -I./headers/ -I./external/zlib-1.2.8/ remoted/syslogtcp.o remoted/syslog.o remoted/main.o remoted/remoted.o remoted/secure.o remoted/config.o remoted/ar-forward.o remoted/sendmsg.o remoted/manager.o os_crypto.a config.a shared.a os_net.a os_regex.a os_xml.a os_zlib.a external/zlib-1.2.8/libz.a -lssl -lcrypto -o ossec-remoted
> shared.a(hash_op.o)(.text+0x461): In function OSHash_Create':
> : warning: srandom() seed choices are invariably poor
> remoted/main.o(.text+0x427): In functionmain':
> : warning: srandomdev() usage; consider switching to arc4random()
> remoted/main.o(.text+0x42c): In function main':
> : warning: random() isn't random; consider using arc4random()
> remoted/sendmsg.o(.text+0x1c): In functionkey_lock':
> : undefined reference to pthread_mutex_lock'
> remoted/sendmsg.o(.text+0x121): In functionsend_msg':
> : undefined reference to pthread_mutex_lock'
> remoted/sendmsg.o(.text+0x177): In functionsend_msg':
> : undefined reference to `pthread_mutex_unlock'
> 
> —
> Reply to this email directly or view it on GitHub.