aboutsummaryrefslogtreecommitdiff
path: root/mk/prog.mk
diff options
context:
space:
mode:
Diffstat (limited to 'mk/prog.mk')
-rw-r--r--mk/prog.mk19
1 files changed, 19 insertions, 0 deletions
diff --git a/mk/prog.mk b/mk/prog.mk
new file mode 100644
index 00000000..716707c6
--- /dev/null
+++ b/mk/prog.mk
@@ -0,0 +1,19 @@
+# rules to build a library
+# based on FreeBSD's bsd.prog.mk
+
+# Copyright 2008 Roy Marples
+
+BINDIR?= /sbin
+OBJS+= ${SRCS:.c=.o}
+
+INSTALL?= install
+
+all: depend ${PROG}
+
+${PROG}: ${SCRIPTS} ${OBJS}
+ ${CC} ${CFLAGS} ${LDFLAGS} ${PROGLDFLAGS} -o $@ ${OBJS} ${LDADD}
+
+clean:
+ rm -f ${OBJS} ${PROG} ${CLEANFILES}
+
+include ${MK}/depend.mk