annotate Makefile @ 3:367dce9bf5a7

add top level Makefile
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 05 Aug 2023 02:10:16 +0000
parents
children 003660a57f99
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
367dce9bf5a7 add top level Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 CC= gcc
367dce9bf5a7 add top level Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 CFLAGS= -O2
367dce9bf5a7 add top level Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 PROGDIR=enc-text
367dce9bf5a7 add top level Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 LIBDIR= libcoding
367dce9bf5a7 add top level Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 SUBDIR= ${PROGDIR} ${LIBDIR}
367dce9bf5a7 add top level Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6
367dce9bf5a7 add top level Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 INSTALL_PREFIX= /opt/freecalypso
367dce9bf5a7 add top level Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8
367dce9bf5a7 add top level Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 all: ${SUBDIR}
367dce9bf5a7 add top level Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10
367dce9bf5a7 add top level Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 enc-text: libcoding
367dce9bf5a7 add top level Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12
367dce9bf5a7 add top level Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 ${SUBDIR}: FRC
367dce9bf5a7 add top level Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 cd $@; ${MAKE} ${MFLAGS} CC=${CC} CFLAGS="${CFLAGS}"
367dce9bf5a7 add top level Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15
367dce9bf5a7 add top level Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 clean: FRC
367dce9bf5a7 add top level Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 rm -f a.out core errs
367dce9bf5a7 add top level Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 for i in ${SUBDIR}; do (cd $$i; ${MAKE} ${MFLAGS} clean); done
367dce9bf5a7 add top level Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19
367dce9bf5a7 add top level Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 install: FRC
367dce9bf5a7 add top level Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 mkdir -p ${INSTALL_PREFIX}
367dce9bf5a7 add top level Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 for i in ${PROGDIR}; do (cd $$i; ${MAKE} ${MFLAGS} \
367dce9bf5a7 add top level Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 INSTALL_PREFIX=${INSTALL_PREFIX} install); done
367dce9bf5a7 add top level Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24
367dce9bf5a7 add top level Makefile
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 FRC: