Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Feb 2011 10:26:13 +0200
From:      Vikash Badal <Vikash.Badal@is.co.za>
To:        Robert Bonomi <bonomi@mail.r-bonomi.com>
Cc:        "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>
Subject:   RE: switching from gnu make to bsd make
Message-ID:  <9B425C841283E0418B1825D40CBCFA615B42230B05@ZABRYSVISEXMBX1.af.didata.local>
In-Reply-To: <201102102359.p1ANxEcA044340@mail.r-bonomi.com>
References:  <9B425C841283E0418B1825D40CBCFA615B422306F9@ZABRYSVISEXMBX1.af.didata.local> <201102102359.p1ANxEcA044340@mail.r-bonomi.com>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
> -----Original Message-----
> From: owner-freebsd-questions@freebsd.org [mailto:owner-freebsd-
> questions@freebsd.org] On Behalf Of Robert Bonomi
> Sent: 11 February 2011 01:59 AM
> To: Vikash Badal
> Cc: freebsd-questions@freebsd.org
> Subject: Re: switching from gnu make to bsd make
>=20
> Try typing "make all" and see what happens then.
>=20
>=20

Make all produces the follow output:

make all
cc -o bin/nntpd -lpthread -lmysqlclient_r -Wall -g -Iinclude -I/usr/local=
/include -I/usr/local/include/mysql -L/usr/local/lib -L/usr/local/lib/mys=
ql  obj/log.o obj/cleanup.o obj/config.o  obj/leecherpool.o obj/mytime.o =
obj/nntp.o  obj/upstream.o obj/mysleep.o obj/sqlpool.o  obj/sql.o obj/sig=
nalhandler.o obj/daemon.o  obj/list.o obj/tcpserver.o obj/tmpfiles.o  obj=
/listenpool.o obj/workers.o  obj/nntpd.o
cc: obj/log.o: No such file or directory
cc: obj/cleanup.o: No such file or directory
cc: obj/config.o: No such file or directory
cc: obj/leecherpool.o: No such file or directory
cc: obj/mytime.o: No such file or directory
cc: obj/nntp.o: No such file or directory
cc: obj/upstream.o: No such file or directory
cc: obj/mysleep.o: No such file or directory
cc: obj/sqlpool.o: No such file or directory
cc: obj/sql.o: No such file or directory
cc: obj/signalhandler.o: No such file or directory
cc: obj/daemon.o: No such file or directory
cc: obj/list.o: No such file or directory
cc: obj/tcpserver.o: No such file or directory
cc: obj/tmpfiles.o: No such file or directory
cc: obj/listenpool.o: No such file or directory
cc: obj/workers.o: No such file or directory
cc: obj/nntpd.o: No such file or directory
*** Error code 1


With gmake :
$(OBJDIR)/%.o:${SRCDIR}/%.c
=20       ${CC} -c ${CFLAGS} ${INCDIR} ${LIBDIR} $< -o $@

This creates all the .o files I need

How do I do this with bsd make ?




> >
> >
> > this is my make file:
> >
> > ---------------------------------------------------------------------=

> ---------
> >
> > CC            =3D cc
> * LIBS          =3D -lpthread -lmysqlclient_r
> > CFLAGS        =3D -Wall -g
> > INCDIR        =3D -Iinclude -I/usr/local/include -
> I/usr/local/include/mysql
> > LIBDIR        =3D -L/usr/local/lib -L/usr/local/lib/mysql
> > OBJDIR        =3D obj
> > SRCDIR        =3D src
> > BINDIR        =3D bin
> > PREFIX        =3D /usr/local/nntpd
> > BINDIRFILES   =3D ${BINDIR}/nntpd
> > OBJS          =3D ${OBJDIR}/log.o ${OBJDIR}/cleanup.o
> ${OBJDIR}/config.o \
> >                 ${OBJDIR}/leecherpool.o ${OBJDIR}/mytime.o
> >                 ${OBJDIR}/upstream.o ${OBJDIR}/mysleep.o
> >                 ${OBJDIR}/sql.o ${OBJDIR}/signalhandler.o
> >                 ${OBJDIR}/list.o ${OBJDIR}/tcpserver.o
> >                 ${OBJDIR}/listenpool.o ${OBJDIR}/workers.o \
> >                 ${OBJDIR}/nntpd.o
> >
> > $(OBJDIR)/%.o:${SRCDIR}/%.c
> >         ${CC} -c ${CFLAGS} ${INCDIR} ${LIBDIR} $< -o $@
> >
> > all:    ${OBJS}
> >         ${CC} -o ${BINDIR}/nntpd ${LIBS} ${CFLAGS} ${INCDIR}
> ${LIBDIR} \
> > 	${OBJDIR}/log.o ${OBJDIR}/cleanup.o ${OBJDIR}/config.o \
> >         ${OBJDIR}/leecherpool.o ${OBJDIR}/mytime.o ${OBJDIR}/nntp.o \=

> >         ${OBJDIR}/upstream.o ${OBJDIR}/mysleep.o ${OBJDIR}/sqlpool.o
> \
> >         ${OBJDIR}/sql.o ${OBJDIR}/signalhandler.o ${OBJDIR}/daemon.o
> \
> >         ${OBJDIR}/list.o ${OBJDIR}/tcpserver.o ${OBJDIR}/tmpfiles.o \=

> >         ${OBJDIR}/listenpool.o ${OBJDIR}/workers.o \
> >         ${OBJDIR}/nntpd.o
> >
> > ---------------------------------------------------------------------=

> ---------
>=20
>=20
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-
> unsubscribe@freebsd.org"
Please note: This email and its content are subject to the disclaimer as =
displayed at the following link http://www.is.co.za/legal/E-mail+Confiden=
tiality+Notice+and+Disclaimer.htm. Should you not have Web access, send a=
=20mail to disclaimers@is.co.za and a copy will be emailed to you.



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?9B425C841283E0418B1825D40CBCFA615B42230B05>