Date: Thu, 10 Feb 2011 09:10:36 +0100 From: Polytropon <freebsd@edvax.de> To: Vikash Badal <Vikash.Badal@is.co.za> Cc: "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org> Subject: Re: switching from gnu make to bsd make Message-ID: <20110210091036.d2f68289.freebsd@edvax.de> In-Reply-To: <9B425C841283E0418B1825D40CBCFA615B422306F9@ZABRYSVISEXMBX1.af.didata.local> References: <9B425C841283E0418B1825D40CBCFA615B422306F9@ZABRYSVISEXMBX1.af.didata.local>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 10 Feb 2011 09:32:06 +0200, Vikash Badal <Vikash.Badal@is.co.za> wrote: > Can someone please advise me as to how I switch the following lines of gnu make to bsd make > > > $(OBJDIR)/%.o:${SRCDIR}/%.c > ${CC} -c ${CFLAGS} ${INCDIR} ${LIBDIR} $< -o $@ It sems to work with BSD make, I've tried it. % make foo ... starts compiling foo.c ... The only thing I would change is the order of the last arguments, which should be "-o $@ $<" (input files last), and a space after ":" in the first line (for better reading). Anyway, it seems to be compatible. 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? -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110210091036.d2f68289.freebsd>