changeset 11:2a62a7decd9f

top Makefile: compilation happening in bootmatch
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 10 Jun 2023 03:23:10 +0000
parents 39b921d851fb
children fe5f7ba7f154
files Makefile
diffstat 1 files changed, 13 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Sat Jun 10 03:18:23 2023 +0000
+++ b/Makefile	Sat Jun 10 03:23:10 2023 +0000
@@ -1,13 +1,23 @@
+CC=	gcc
+CFLAGS=	-O2
+SUBDIR=	bootmatch
+
 INSTALL_PREFIX=	/opt/freecalypso
 
-all:
+all:	${SUBDIR}
+
+${SUBDIR}: FRC
+	cd $@; ${MAKE} ${MFLAGS} CC=${CC} CFLAGS="${CFLAGS}"
 
-clean:
+clean: FRC
+	for i in ${SUBDIR}; do (cd $$i; ${MAKE} ${MFLAGS} clean); done
 
-install:
+install: FRC
 	mkdir -p ${INSTALL_PREFIX}/bin
 	install -c -m 755 sh/* ${INSTALL_PREFIX}/bin
 	mkdir -p ${INSTALL_PREFIX}/scripts
 	install -c -m 644 cmd/* ${INSTALL_PREFIX}/scripts
 	mkdir -p ${INSTALL_PREFIX}/target-bin
 	install -c -m 644 target-bin/* ${INSTALL_PREFIX}/target-bin
+
+FRC: