aboutsummaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2011-02-02 18:18:55 -0600
committerWilliam Hubbs <w.d.hubbs@gmail.com>2011-02-04 22:30:30 -0600
commitdb6d680765b4b9a4d404f6b2e6d5644b2fe3418d (patch)
tree21986fb2b800f6dc0ddab04dc982b827d3a74e4e /mk
parenta2e9cde737ede93502a80fe50e62b0aea50643dc (diff)
rework pam, ncurses and termcap include files
This allows error checking inside the included files instead of either including the appropriate file or a blank file. Also the blank file named .mk gets removed by this change.
Diffstat (limited to 'mk')
-rw-r--r--mk/.mk0
-rw-r--r--mk/ncurses.mk3
-rw-r--r--mk/pam.mk4
-rw-r--r--mk/termcap.mk8
4 files changed, 12 insertions, 3 deletions
diff --git a/mk/.mk b/mk/.mk
deleted file mode 100644
index e69de29b..00000000
--- a/mk/.mk
+++ /dev/null
diff --git a/mk/ncurses.mk b/mk/ncurses.mk
deleted file mode 100644
index d93e8fbe..00000000
--- a/mk/ncurses.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-LIBTERMCAP?= -lncurses
-CPPFLAGS+= -DHAVE_TERMCAP
-LDADD+= ${LIBTERMCAP}
diff --git a/mk/pam.mk b/mk/pam.mk
index 65115d5d..15ffb546 100644
--- a/mk/pam.mk
+++ b/mk/pam.mk
@@ -1,6 +1,10 @@
+ifeq (${MKPAM},pam)
LIBPAM?= -lpam
CPPFLAGS+= -DHAVE_PAM
LDADD+= ${LIBPAM}
PAMDIR?= /etc/pam.d
PAMMODE?= 0644
+else ifneq (${MKPAM},)
+$(error if MKPAM is defined, it must be "pam")
+endif
diff --git a/mk/termcap.mk b/mk/termcap.mk
index 7a603e38..b716276b 100644
--- a/mk/termcap.mk
+++ b/mk/termcap.mk
@@ -1,3 +1,11 @@
+ifeq (${MKTERMCAP},ncurses)
+LIBTERMCAP?= -lncurses
+CPPFLAGS+= -DHAVE_TERMCAP
+LDADD+= ${LIBTERMCAP}
+else ifeq (${MKTERMCAP},termcap)
LIBTERMCAP?= -ltermcap
CPPFLAGS+= -DHAVE_TERMCAP
LDADD+= ${LIBTERMCAP}
+else ifneq (${MKTERMCAP},)
+$(error If MKTERMCAP is defined, it must be ncurses or termcap)
+endif