From owner-freebsd-questions@FreeBSD.ORG Thu Feb 10 08:10:40 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30F4C106564A for ; Thu, 10 Feb 2011 08:10:40 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) by mx1.freebsd.org (Postfix) with ESMTP id E57938FC0C for ; Thu, 10 Feb 2011 08:10:39 +0000 (UTC) Received: from r55.edvax.de (port-92-195-143-131.dynamic.qsc.de [92.195.143.131]) by mx01.qsc.de (Postfix) with ESMTP id E9A7C3CBF7; Thu, 10 Feb 2011 09:10:37 +0100 (CET) Received: from r55.edvax.de (localhost [127.0.0.1]) by r55.edvax.de (8.14.2/8.14.2) with SMTP id p1A8AabY004114; Thu, 10 Feb 2011 09:10:36 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Thu, 10 Feb 2011 09:10:36 +0100 From: Polytropon To: Vikash Badal Message-Id: <20110210091036.d2f68289.freebsd@edvax.de> In-Reply-To: <9B425C841283E0418B1825D40CBCFA615B422306F9@ZABRYSVISEXMBX1.af.didata.local> References: <9B425C841283E0418B1825D40CBCFA615B422306F9@ZABRYSVISEXMBX1.af.didata.local> Organization: EDVAX X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.1; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "freebsd-questions@freebsd.org" Subject: Re: switching from gnu make to bsd make X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Feb 2011 08:10:40 -0000 On Thu, 10 Feb 2011 09:32:06 +0200, Vikash Badal 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, ...