aboutsummaryrefslogtreecommitdiff
path: root/contrib/bsddialog/lib/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/bsddialog/lib/Makefile')
-rw-r--r--contrib/bsddialog/lib/Makefile21
1 files changed, 20 insertions, 1 deletions
diff --git a/contrib/bsddialog/lib/Makefile b/contrib/bsddialog/lib/Makefile
index 252b33f79848..c728541a9f7a 100644
--- a/contrib/bsddialog/lib/Makefile
+++ b/contrib/bsddialog/lib/Makefile
@@ -10,6 +10,7 @@ HEADERS = bsddialog.h bsddialog_theme.h bsddialog_progressview.h
SOURCES = barbox.c datebox.c formbox.c libbsddialog.c lib_util.c \
menubox.c messagebox.c textbox.c theme.c timebox.c
OBJECTS = ${SOURCES:.c=.o}
+PREFIX = /usr/local
.if defined(DEBUG)
CFLAGS += -g
@@ -23,7 +24,23 @@ LDFLAGS += -fstack-protector-strong -shared -Wl,-x -Wl,--fatal-warnings \
LN = ln -s -f
RM = rm -f
-all : ${LIBRARY}
+all: ${LIBRARY}
+
+install: all
+ ${INSTALL} -m 0644 bsddialog.h ${DESTDIR}${PREFIX}/include/bsddialog.h
+ ${INSTALL} -m 0644 bsddialog_progressview.h ${DESTDIR}${PREFIX}/include/bsddialog_progressview.h
+ ${INSTALL} -m 0644 bsddialog_theme.h ${DESTDIR}${PREFIX}/include/bsddialog_theme.h
+ ${INSTALL} -m 0644 ${LIBRARY_A} ${DESTDIR}${PREFIX}/lib/${LIBRARY_A}
+ ${INSTALL} -m 0755 ${LIBRARY_SO}.${VERSION} ${DESTDIR}${PREFIX}/lib/${LIBRARY_SO}.${VERSION}
+ ${LN} ${LIBRARY_SO}.${VERSION} ${DESTDIR}${PREFIX}/lib/${LIBRARY_SO}
+
+uninstall:
+ ${RM} ${DESTDIR}${PREFIX}/include/bsddialog.h
+ ${RM} ${DESTDIR}${PREFIX}/include/bsddialog_progressview.h
+ ${RM} ${DESTDIR}${PREFIX}/include/bsddialog_theme.h
+ ${RM} ${DESTDIR}${PREFIX}/lib/${LIBRARY_A}
+ ${RM} ${DESTDIR}${PREFIX}/lib/${LIBRARY_SO}.${VERSION}
+ ${RM} ${DESTDIR}${PREFIX}/lib/${LIBRARY_SO}
${LIBRARY}: ${LIBRARY_SO} ${LIBRARY_A}
@@ -42,3 +59,5 @@ ${LIBRARY_A}: ${OBJECTS}
clean:
${RM} ${LIBRARY_SO}* *.o *~ *.gz ${LIBRARY_A}
+
+.PHONY: all install uninstall ${LIBRARY} clean