On Thu, Nov 15, 2012 at 05:53:52PM +0100, Reyk Floeter wrote:
> For all the GNU people, here is how a Makefile for hello.c should look like:
> PROG= hello
> NOMAN= yes
> .include <bsd.prog.mk>
> 
> Yes, you're supposed to provide a man page hello.1 and remove the NOMAN line 
> :)

Well, a portable Makefile for hello.c would be:

.POSIX:

OBJS = hello.o

hello: $(OBJS)
        $(CC) -o $@ $(CFLAGS) $(OBJS)



anything else (all, install, whatever) are just bonus.
Surprisingly, .PHONY is not even standard...

Reply via email to