changeset 473:90d7c360a614

main tree Makefile hierarchy: INSTALL_PREFIX= scheme implemented
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 13 Feb 2019 05:06:15 +0000
parents 368ffb8a08e5
children bbb4f92265d2
files Makefile ffstools/Makefile ffstools/cal2text/Makefile ffstools/caltools/Makefile ffstools/newcomp/Makefile ffstools/tiaud/Makefile ffstools/tiffs-rd/Makefile ffstools/tiffs-wrappers/Makefile loadtools/Makefile miscutil/Makefile ringtools/Makefile rvinterf/Makefile rvinterf/asyncshell/Makefile rvinterf/ctracedec/Makefile rvinterf/etmsync/Makefile rvinterf/lowlevel/Makefile rvinterf/rvtat/Makefile rvinterf/tmsh/Makefile uptools/Makefile uptools/atcmd/Makefile uptools/atinterf/Makefile uptools/sms-pdu-decode/Makefile
diffstat 22 files changed, 95 insertions(+), 30 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Tue Feb 12 00:30:37 2019 +0000
+++ b/Makefile	Wed Feb 13 05:06:15 2019 +0000
@@ -4,6 +4,8 @@
 LIBDIR=	librftab libserial
 SUBDIR=	${PROGDIR} ${LIBDIR}
 
+INSTALL_PREFIX=	/opt/freecalypso
+
 all:	${SUBDIR}
 
 ffstools:	librftab
@@ -20,11 +22,12 @@
 	for i in ${SUBDIR}; do (cd $$i; ${MAKE} ${MFLAGS} clean); done
 
 install: FRC
-	mkdir -p /opt/freecalypso
-	for i in ${PROGDIR}; do (cd $$i; ${MAKE} ${MFLAGS} install); done
+	mkdir -p ${INSTALL_PREFIX}
+	for i in ${PROGDIR}; do (cd $$i; ${MAKE} ${MFLAGS} \
+		INSTALL_PREFIX=${INSTALL_PREFIX} install); done
 	if [ -d target-bin ]; then \
-		mkdir -p /opt/freecalypso/target-bin; \
-		install -c -m 644 target-bin/* /opt/freecalypso/target-bin; \
+		mkdir -p ${INSTALL_PREFIX}/target-bin; \
+		install -c -m 644 target-bin/* ${INSTALL_PREFIX}/target-bin; \
 	fi
 
 FRC:
--- a/ffstools/Makefile	Tue Feb 12 00:30:37 2019 +0000
+++ b/ffstools/Makefile	Wed Feb 13 05:06:15 2019 +0000
@@ -2,6 +2,8 @@
 CFLAGS=	-O2
 SUBDIR=	cal2text caltools newcomp tiaud tiffs-rd tiffs-wrappers
 
+INSTALL_PREFIX=	/opt/freecalypso
+
 all:	${SUBDIR}
 
 ${SUBDIR}: FRC
@@ -12,6 +14,7 @@
 	for i in ${SUBDIR}; do (cd $$i; ${MAKE} ${MFLAGS} clean); done
 
 install: FRC
-	for i in ${SUBDIR}; do (cd $$i; ${MAKE} ${MFLAGS} install); done
+	for i in ${SUBDIR}; do (cd $$i; ${MAKE} ${MFLAGS} \
+		INSTALL_PREFIX=${INSTALL_PREFIX} install); done
 
 FRC:
--- a/ffstools/cal2text/Makefile	Tue Feb 12 00:30:37 2019 +0000
+++ b/ffstools/cal2text/Makefile	Wed Feb 13 05:06:15 2019 +0000
@@ -3,7 +3,10 @@
 PROG=	fc-cal2text
 OBJS=	dircheck.o main.o mkdir.o smallconv.o
 LIBS=	../../librftab/librftab.a
-INSTBIN=/opt/freecalypso/bin
+
+INSTALL_PREFIX=	/opt/freecalypso
+
+INSTBIN=${INSTALL_PREFIX}/bin
 
 all:	${PROG}
 
--- a/ffstools/caltools/Makefile	Tue Feb 12 00:30:37 2019 +0000
+++ b/ffstools/caltools/Makefile	Wed Feb 13 05:06:15 2019 +0000
@@ -1,7 +1,10 @@
 CC=	gcc
 CFLAGS=	-O2
 PROGS=	c1xx-calextr fc-cal2bin fc-rftab2c
-INSTBIN=/opt/freecalypso/bin
+
+INSTALL_PREFIX=	/opt/freecalypso
+
+INSTBIN=${INSTALL_PREFIX}/bin
 
 all:	${PROGS}
 
--- a/ffstools/newcomp/Makefile	Tue Feb 12 00:30:37 2019 +0000
+++ b/ffstools/newcomp/Makefile	Wed Feb 13 05:06:15 2019 +0000
@@ -1,7 +1,10 @@
 CC=	gcc
 CFLAGS=	-O2
 PROGS=	compile-fc-batt compile-fc-chg
-INSTBIN=/opt/freecalypso/bin
+
+INSTALL_PREFIX=	/opt/freecalypso
+
+INSTBIN=${INSTALL_PREFIX}/bin
 
 all:	${PROGS}
 
--- a/ffstools/tiaud/Makefile	Tue Feb 12 00:30:37 2019 +0000
+++ b/ffstools/tiaud/Makefile	Wed Feb 13 05:06:15 2019 +0000
@@ -1,7 +1,10 @@
 CC=	gcc
 CFLAGS=	-O2
 PROGS=	compile decomp mkvol
-INSTBIN=/opt/freecalypso/bin
+
+INSTALL_PREFIX=	/opt/freecalypso
+
+INSTBIN=${INSTALL_PREFIX}/bin
 
 all:	${PROGS}
 
--- a/ffstools/tiffs-rd/Makefile	Tue Feb 12 00:30:37 2019 +0000
+++ b/ffstools/tiffs-rd/Makefile	Wed Feb 13 05:06:15 2019 +0000
@@ -3,7 +3,10 @@
 PROG=	tiffs
 OBJS=	basics.o cat.o globals.o inode.o ls.o main.o object.o tree.o xtr.o
 HDRS=	globals.h pathname.h struct.h types.h
-INSTBIN=/opt/freecalypso/bin
+
+INSTALL_PREFIX=	/opt/freecalypso
+
+INSTBIN=${INSTALL_PREFIX}/bin
 
 all:	${PROG}
 
--- a/ffstools/tiffs-wrappers/Makefile	Tue Feb 12 00:30:37 2019 +0000
+++ b/ffstools/tiffs-wrappers/Makefile	Wed Feb 13 05:06:15 2019 +0000
@@ -1,7 +1,10 @@
 CC=	gcc
 CFLAGS=	-O2
 PROGS=	mokoffs pirffs
-INSTBIN=/opt/freecalypso/bin
+
+INSTALL_PREFIX=	/opt/freecalypso
+
+INSTBIN=${INSTALL_PREFIX}/bin
 
 MOKOFFS_OBJS=	installpath.o mokoffs.o
 PIRFFS_OBJS=	installpath.o pirffs.o
--- a/loadtools/Makefile	Tue Feb 12 00:30:37 2019 +0000
+++ b/loadtools/Makefile	Wed Feb 13 05:06:15 2019 +0000
@@ -1,9 +1,12 @@
 CC=	gcc
 CFLAGS=	-O2
 PROGS=	fc-iram fc-loadtool fc-xram fc-compalram fc-buzplay
-INSTBIN=/opt/freecalypso/bin
-INSTCONF=/opt/freecalypso/loadtools
-INSTHELP=/opt/freecalypso/helpfiles
+
+INSTALL_PREFIX=	/opt/freecalypso
+
+INSTBIN=${INSTALL_PREFIX}/bin
+INSTCONF=${INSTALL_PREFIX}/loadtools
+INSTHELP=${INSTALL_PREFIX}/helpfiles
 
 EXTRA_OBJ=	compalload.o
 
--- a/miscutil/Makefile	Tue Feb 12 00:30:37 2019 +0000
+++ b/miscutil/Makefile	Wed Feb 13 05:06:15 2019 +0000
@@ -3,7 +3,10 @@
 PROGS=	fc-fr2tch fc-gsm2vm fc-rgbconv fc-serterm fc-tch2fr fc-vm2hex imei-luhn\
 	mokosrec2bin
 SCRIPTS=c139explore pirexplore
-INSTBIN=/opt/freecalypso/bin
+
+INSTALL_PREFIX=	/opt/freecalypso
+
+INSTBIN=${INSTALL_PREFIX}/bin
 
 all:	${PROGS}
 
--- a/ringtools/Makefile	Tue Feb 12 00:30:37 2019 +0000
+++ b/ringtools/Makefile	Wed Feb 13 05:06:15 2019 +0000
@@ -1,7 +1,10 @@
 CC=	gcc
 CFLAGS=	-O2
 PROGS=	fc-e1decode fc-e1gen
-INSTBIN=/opt/freecalypso/bin
+
+INSTALL_PREFIX=	/opt/freecalypso
+
+INSTBIN=${INSTALL_PREFIX}/bin
 
 all:	${PROGS}
 
--- a/rvinterf/Makefile	Tue Feb 12 00:30:37 2019 +0000
+++ b/rvinterf/Makefile	Wed Feb 13 05:06:15 2019 +0000
@@ -4,7 +4,8 @@
 LIBDIR=	libasync libg23 libinterf
 SUBDIR=	${PROGDIR} ${LIBDIR}
 
-INCLUDE_INSTALL_DIR=	/opt/freecalypso/include/rvinterf
+INSTALL_PREFIX=	/opt/freecalypso
+INCLUDE_INSTALL_DIR=	${INSTALL_PREFIX}/include/rvinterf
 
 all:	${SUBDIR}
 
@@ -22,7 +23,8 @@
 	for i in ${SUBDIR}; do (cd $$i; ${MAKE} ${MFLAGS} clean); done
 
 install: FRC
-	for i in ${PROGDIR}; do (cd $$i; ${MAKE} ${MFLAGS} install); done
+	for i in ${PROGDIR}; do (cd $$i; ${MAKE} ${MFLAGS} \
+		INSTALL_PREFIX=${INSTALL_PREFIX} install); done
 	mkdir -p ${INCLUDE_INSTALL_DIR}
 	install -c -m 644 include/* ${INCLUDE_INSTALL_DIR}
 
--- a/rvinterf/asyncshell/Makefile	Tue Feb 12 00:30:37 2019 +0000
+++ b/rvinterf/asyncshell/Makefile	Wed Feb 13 05:06:15 2019 +0000
@@ -6,8 +6,11 @@
 	poweroff.o rxctl.o sendarb.o sendsp.o tchcmd.o tchplay.o tchrec.o \
 	usercmd.o
 LIBS=	../libasync/libasync.a ../libg23/libg23.a ../libinterf/libinterf.a
-INSTBIN=/opt/freecalypso/bin
-INSTHELP=/opt/freecalypso/helpfiles
+
+INSTALL_PREFIX=	/opt/freecalypso
+
+INSTBIN=${INSTALL_PREFIX}/bin
+INSTHELP=${INSTALL_PREFIX}/helpfiles
 
 all:	${PROG}
 
--- a/rvinterf/ctracedec/Makefile	Tue Feb 12 00:30:37 2019 +0000
+++ b/rvinterf/ctracedec/Makefile	Wed Feb 13 05:06:15 2019 +0000
@@ -2,7 +2,10 @@
 CFLAGS=	-O2
 PROG=	ctracedec
 OBJS=	decode.o doprnt.o main.o processlog.o readtab.o
-INSTBIN=/opt/freecalypso/bin
+
+INSTALL_PREFIX=	/opt/freecalypso
+
+INSTBIN=${INSTALL_PREFIX}/bin
 
 all:	${PROG}
 
--- a/rvinterf/etmsync/Makefile	Tue Feb 12 00:30:37 2019 +0000
+++ b/rvinterf/etmsync/Makefile	Wed Feb 13 05:06:15 2019 +0000
@@ -2,8 +2,11 @@
 CFLAGS=	-O2
 CPPFLAGS=-I../include
 PROGS=	fc-dspapidump fc-fsio fc-memdump fc-readcal fc-tmsync
-INSTBIN=/opt/freecalypso/bin
-INSTHELP=/opt/freecalypso/helpfiles
+
+INSTALL_PREFIX=	/opt/freecalypso
+
+INSTBIN=${INSTALL_PREFIX}/bin
+INSTHELP=${INSTALL_PREFIX}/helpfiles
 
 LIBINTERF=	../libinterf/libinterf.a
 LIBRFTAB=	../../librftab/librftab.a
--- a/rvinterf/lowlevel/Makefile	Tue Feb 12 00:30:37 2019 +0000
+++ b/rvinterf/lowlevel/Makefile	Wed Feb 13 05:06:15 2019 +0000
@@ -1,9 +1,12 @@
 CC=	gcc
 CFLAGS=	-O2
 PROGS=	rvtdump rvinterf tfc139
-INSTBIN=/opt/freecalypso/bin
 LIBS=	../../libserial/libserial.a ../libg23/libg23.a
 
+INSTALL_PREFIX=	/opt/freecalypso
+
+INSTBIN=${INSTALL_PREFIX}/bin
+
 RVTDUMP_OBJS=	format.o format_fc.o output.o packetrx.o rvtdump.o
 
 RVINTERF_OBJS=	clientcmd.o format.o format_fc.o localsock.o logsent.o \
--- a/rvinterf/rvtat/Makefile	Tue Feb 12 00:30:37 2019 +0000
+++ b/rvinterf/rvtat/Makefile	Wed Feb 13 05:06:15 2019 +0000
@@ -4,7 +4,10 @@
 PROG=	fcup-rvtat
 OBJS=	interf.o main.o
 LIBS=	../libinterf/libinterf.a
-INSTBIN=/opt/freecalypso/bin
+
+INSTALL_PREFIX=	/opt/freecalypso
+
+INSTBIN=${INSTALL_PREFIX}/bin
 
 all:	${PROG}
 
--- a/rvinterf/tmsh/Makefile	Tue Feb 12 00:30:37 2019 +0000
+++ b/rvinterf/tmsh/Makefile	Wed Feb 13 05:06:15 2019 +0000
@@ -7,7 +7,10 @@
 	rftablechk.o saverftab.o tmcore.o usercmd.o
 LIBS=	../libasync/libasync.a ../libinterf/libinterf.a \
 	../../librftab/librftab.a
-INSTBIN=/opt/freecalypso/bin
+
+INSTALL_PREFIX=	/opt/freecalypso
+
+INSTBIN=${INSTALL_PREFIX}/bin
 
 all:	${PROG}
 
--- a/uptools/Makefile	Tue Feb 12 00:30:37 2019 +0000
+++ b/uptools/Makefile	Wed Feb 13 05:06:15 2019 +0000
@@ -4,6 +4,8 @@
 LIBDIR=	libcoding
 SUBDIR=	${PROGDIR} ${LIBDIR}
 
+INSTALL_PREFIX=	/opt/freecalypso
+
 all:	${SUBDIR}
 
 atcmd:		libcoding
@@ -17,6 +19,7 @@
 	for i in ${SUBDIR}; do (cd $$i; ${MAKE} ${MFLAGS} clean); done
 
 install: FRC
-	for i in ${PROGDIR}; do (cd $$i; ${MAKE} ${MFLAGS} install); done
+	for i in ${PROGDIR}; do (cd $$i; ${MAKE} ${MFLAGS} \
+		INSTALL_PREFIX=${INSTALL_PREFIX} install); done
 
 FRC:
--- a/uptools/atcmd/Makefile	Tue Feb 12 00:30:37 2019 +0000
+++ b/uptools/atcmd/Makefile	Wed Feb 13 05:06:15 2019 +0000
@@ -2,7 +2,10 @@
 CFLAGS=	-O2
 PROGS=	fcup-at fcup-settime fcup-smdump fcup-smsend fcup-smsendmult \
 	fcup-smsendpdu fcup-smwrite
-INSTBIN=/opt/freecalypso/bin
+
+INSTALL_PREFIX=	/opt/freecalypso
+
+INSTBIN=${INSTALL_PREFIX}/bin
 
 LIBCODING=	../libcoding/libcoding.a
 
--- a/uptools/atinterf/Makefile	Tue Feb 12 00:30:37 2019 +0000
+++ b/uptools/atinterf/Makefile	Wed Feb 13 05:06:15 2019 +0000
@@ -3,7 +3,10 @@
 PROG=	fcup-atinterf
 LIB=	../../libserial/libserial.a
 OBJS=	${PROG}.o ${LIB}
-INSTBIN=/opt/freecalypso/bin
+
+INSTALL_PREFIX=	/opt/freecalypso
+
+INSTBIN=${INSTALL_PREFIX}/bin
 
 all:	${PROG}
 
--- a/uptools/sms-pdu-decode/Makefile	Tue Feb 12 00:30:37 2019 +0000
+++ b/uptools/sms-pdu-decode/Makefile	Wed Feb 13 05:06:15 2019 +0000
@@ -3,7 +3,10 @@
 PROG=	sms-pdu-decode
 LIB=	../libcoding/libcoding.a
 OBJS=	${PROG}.o ${LIB}
-INSTBIN=/opt/freecalypso/bin
+
+INSTALL_PREFIX=	/opt/freecalypso
+
+INSTBIN=${INSTALL_PREFIX}/bin
 
 all:	${PROG}