diff Makefile @ 19:9ff94f80fcb5

top Makefile ported over
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 14 Mar 2021 08:04:12 +0000
parents
children 0bc89d61fc59
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Makefile	Sun Mar 14 08:04:12 2021 +0000
@@ -0,0 +1,36 @@
+CC=	gcc
+CFLAGS=	-O2
+CFLAGS_PCSC=	-O2 -I/usr/include/PCSC
+
+PROGDIR=calypso simtool uicc utils
+PCSC=	pcsc
+LIBDIR=	libcommon libutil
+SUBDIR=	${PROGDIR} ${PCSC} ${LIBDIR}
+
+INSTALL_PREFIX=	/opt/freecalypso
+
+all:	${SUBDIR}
+
+simtool:	libcommon libutil
+uicc:		libcommon libutil
+utils:		libutil
+
+${PROGDIR} ${LIBDIR}: FRC
+	cd $@; ${MAKE} ${MFLAGS} CC=${CC} CFLAGS="${CFLAGS}"
+
+pcsc: FRC
+	cd $@; ${MAKE} ${MFLAGS} CC=${CC} CFLAGS="${CFLAGS_PCSC}"
+
+clean: FRC
+	rm -f a.out core errs
+	for i in ${SUBDIR}; do (cd $$i; ${MAKE} ${MFLAGS} clean); done
+
+install: FRC
+	mkdir -p ${INSTALL_PREFIX}
+	for i in ${PROGDIR} ${PCSC}; do (cd $$i; ${MAKE} ${MFLAGS} \
+		INSTALL_PREFIX=${INSTALL_PREFIX} install); done
+	mkdir -p ${INSTALL_PREFIX}/sim-data
+	mkdir -p ${INSTALL_PREFIX}/sim-scripts
+	install -c -m 644 scripts/* ${INSTALL_PREFIX}/sim-scripts
+
+FRC: