diff Makefile @ 11:3d6cfb615d90

add make install hierarchy
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 13 Dec 2023 05:16:12 +0000
parents 05a94b08c8e1
children 78319ed870dc
line wrap: on
line diff
--- a/Makefile	Wed Dec 13 03:56:16 2023 +0000
+++ b/Makefile	Wed Dec 13 05:16:12 2023 +0000
@@ -1,4 +1,6 @@
-SUBDIR=	libnumdb libnumutil utils
+SUBDIR=	include libnumdb libnumutil utils
+
+INSTALL_PREFIX=	/opt/themwi
 
 all:	${SUBDIR}
 
@@ -7,6 +9,11 @@
 ${SUBDIR}: FRC
 	cd $@; ${MAKE} ${MFLAGS}
 
+install: FRC
+	mkdir -p ${INSTALL_PREFIX}
+	for i in ${SUBDIR}; do (cd $$i; ${MAKE} ${MFLAGS} \
+		INSTALL_PREFIX=${INSTALL_PREFIX} install); done
+
 clean: FRC
 	rm -f a.out core errs
 	for i in ${SUBDIR}; do (cd $$i; ${MAKE} ${MFLAGS} clean); done