view loadtools/Makefile @ 204:064d4eedb3a6

loadtools: second program invokation support added to fc-iram like in fc-xram
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 01 May 2017 21:54:58 +0000
parents 684eddecbc62
children 8c011177adb9
line wrap: on
line source

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

EXTRA_OBJ=	compalload.o

COMPALRAM_OBJS=	compalload.o compalram.o defpath.o sercomm.o ttypassthru.o

IRAM_OBJS=	defexitstub.o defpath.o flashstubs.o hexdecode.o hwparam.o \
		romload.o secondprog.o sercomm.o sertool.o srecreader.o \
		ttypassthru.o ${EXTRA_OBJ}

LOADTOOL_OBJS=	crc32tab.o defpath.o flashops.o flcmplboot.o flmain.o flmisc.o \
		flprogbin.o flprogsrec.o flutil.o hexdecode.o hwparam.o \
		labaud.o ltdispatch.o ltdump.o ltexit.o lthelp.o ltmain.o \
		ltmisc.o ltpassthru.o ltscript.o romload.o sercomm.o \
		srecreader.o tpinterf.o tpinterf2.o tpinterf3.o ${EXTRA_OBJ}

XRAM_OBJS=	chainload.o clmain.o defexitstub.o defpath.o flashstubs.o \
		hexdecode.o hwparam.o initscript.o labaud.o romload.o \
		secondprog.o sercomm.o srecreader.o tpinterf.o ttypassthru.o \
		${EXTRA_OBJ}

BUZPLAY_OBJS=	bpdispatch.o bpmain.o buzplay.o defpath.o flashstubs.o \
		hexdecode.o hwparam.o labaud.o ltexit.o ltpassthru.o romload.o \
		sercomm.o srecreader.o tpinterf.o ${EXTRA_OBJ}

all:	${PROGS}

fc-compalram:	${COMPALRAM_OBJS}
	${CC} ${CFLAGS} -o $@ ${COMPALRAM_OBJS}

fc-iram:	${IRAM_OBJS}
	${CC} ${CFLAGS} -o $@ ${IRAM_OBJS}

fc-loadtool:	${LOADTOOL_OBJS}
	${CC} ${CFLAGS} -o $@ ${LOADTOOL_OBJS}

fc-xram:	${XRAM_OBJS}
	${CC} ${CFLAGS} -o $@ ${XRAM_OBJS}

fc-buzplay:	${BUZPLAY_OBJS}
	${CC} ${CFLAGS} -o $@ ${BUZPLAY_OBJS}

install:
	mkdir -p ${INSTBIN}
	install -c ${PROGS} ${INSTBIN}
	mkdir -p ${INSTCONF}
	install -c -m 644 scripts/* ${INSTCONF}
	mkdir -p ${INSTHELP}
	install -c -m 644 loadtool.help ${INSTHELP}

clean:
	rm -f *.o *.out *errs ${PROGS}