switching from gnu make to bsd make
Robert Bonomi
bonomi at mail.r-bonomi.com
Thu Feb 10 23:56:26 UTC 2011
> From: Vikash Badal <Vikash.Badal at 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 at edvax.de] Sent: 10 February 2011 10:11
> > AM To: Vikash Badal Cc: freebsd-questions at 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
>
> ------------------------------------------------------------------------------
More information about the freebsd-questions
mailing list