Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Feb 2011 17:59:14 -0600 (CST)
From:      Robert Bonomi <bonomi@mail.r-bonomi.com>
To:        Vikash.Badal@is.co.za
Cc:        freebsd-questions@freebsd.org
Subject:   Re: switching from gnu make to bsd make
Message-ID:  <201102102359.p1ANxEcA044340@mail.r-bonomi.com>
In-Reply-To: <9B425C841283E0418B1825D40CBCFA615B422306F9@ZABRYSVISEXMBX1.af.didata.local>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help

> From: Vikash Badal <Vikash.Badal@is.co.za>
> Date: Thu, 10 Feb 2011 11:30:02 +0200
> Subject: RE: switching from gnu make to bsd make
>
> > -----Original Message-----
> > From: Polytropon [mailto:freebsd@edvax.de] Sent: 10 February 2011 10:11 
> > AM To: Vikash Badal Cc: freebsd-questions@freebsd.org Subject: Re: 
> > switching from gnu make to bsd make
> >
> > Of course, in my testing case OBJDIR and SRCDIR are empty, and I didn't 
> > define any of CC, CFLAGS, INCDIR or LIBDIR, so the defaults have been 
> > chosen.
> >
> > Do you encounter a specific problem?
>
> This is my problem:
>
> vix:$ make make: don't know how to make src/%.c. Stop

Just telling people "what happened" is *NOT* enough for intelligent
diagnosis of the  problem.  You also have to tell people  WHAT YOU DID
that provoked the error you encountered.

That said, dusting off my crystal ball -- which appears to be *working*
today -- you simply typed "make" at the shell prompt.

Try typing "make all" and see what happens then.


>
>
> this is my make file:
>
> ------------------------------------------------------------------------------
>
> CC            = cc 
* LIBS          = -lpthread -lmysqlclient_r 
> CFLAGS        = -Wall -g 
> INCDIR        = -Iinclude -I/usr/local/include -I/usr/local/include/mysql 
> LIBDIR        = -L/usr/local/lib -L/usr/local/lib/mysql 
> OBJDIR        = obj 
> SRCDIR        = src 
> BINDIR        = bin 
> PREFIX        = /usr/local/nntpd 
> BINDIRFILES   = ${BINDIR}/nntpd
> OBJS          = ${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
>
> ------------------------------------------------------------------------------





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