comments for a pmake newb

Joseph Mingrone jrm at
Mon Nov 10 02:10:56 UTC 2014

I'm porting a program that uses a simple GNU make file, but I'm thinking
about replacing the make file to remove the devel/gmake dependency.  I
don't foresee many upstream changes that will make this an issue.  Is
this a bad/good idea?  Are there any example ports that do this?  My
searching didn't turn any up.

My simple make file replacement is below.  If you have any suggestions
to offer, I'm open to criticism.



PROG = blah
SRCS != echo *.c
OBJS = $(SRCS:.c=.o)

INC	= -I/usr/local/include
LDFLAGS = -L/usr/local/lib
LDLIBS  = -lX11

.ifmake debug
   CFLAGS += -DDEBUG -g -O0

${PROG}: ${OBJS}

${OBJS}: ${SRCS}
	${CC} -c ${CFLAGS} ${INC} ${SRCS}

debug: ${PROG}

	rm -f ${PROG} *.o *.core

More information about the freebsd-ports mailing list