diff --git a/Makefile b/Makefile
index 3777b587855efd349efc34b17d00e1f3404e8858..d2fa3b26d324df8671fca5d9a357380635c4543c 100644
--- a/Makefile
+++ b/Makefile
@@ -233,7 +233,7 @@ endif
 _ASTCFLAGS+=$(OPTIONS)
 
 MOD_SUBDIRS:=channels pbx apps codecs formats cdr cel bridges funcs tests main res addons $(LOCAL_MOD_SUBDIRS)
-OTHER_SUBDIRS:=utils agi
+OTHER_SUBDIRS:=utils agi contrib
 SUBDIRS:=$(OTHER_SUBDIRS) $(MOD_SUBDIRS)
 SUBDIRS_INSTALL:=$(SUBDIRS:%=%-install)
 SUBDIRS_CLEAN:=$(SUBDIRS:%=%-clean)
diff --git a/contrib/Makefile b/contrib/Makefile
new file mode 100644
index 0000000000000000000000000000000000000000..2c91b47abf96866de7d9bfe7e7dad4387b4875f1
--- /dev/null
+++ b/contrib/Makefile
@@ -0,0 +1,29 @@
+#
+# Asterisk -- A telephony toolkit for Linux.
+#
+# Contrib scripts
+#
+# Copyright (C) 1999-2014, Digium, Inc.
+#
+# This program is free software, distributed under the terms of
+# the GNU General Public License
+#
+
+ASTTOPDIR?=..
+-include $(ASTTOPDIR)/menuselect.makeopts
+
+.PHONY: all clean install uninstall
+
+all:
+clean:
+
+include $(ASTTOPDIR)/Makefile.rules
+
+install:
+	if [ -n "$(findstring REF_DEBUG,$(MENUSELECT_CFLAGS))" ]; then \
+		$(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/scripts"; \
+		$(INSTALL) -m 755 scripts/refcounter.py "$(DESTDIR)$(ASTDATADIR)/scripts/refcounter.py"; \
+	fi
+
+uninstall:
+	rm -f "$(DESTDIR)$(ASTDATADIR)/scripts/refcounter.py"