view loadtools/Makefile @ 1012:11391cb6bdc0

patch from fixeria: doc change from SE K2x0 to K2xx Since their discovery in late 2022, Sony Ericsson K200 and K220 phones were collectively referred to as SE K2x0 in FreeCalypso documentation. However, now that SE K205 has been discovered as yet another member of the same family (same PCBA in different case), it makes more sense to refer to the whole family as SE K2xx.
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 23 Sep 2024 12:23:20 +0000
parents 511e2b85c115
children
line wrap: on
line source

CC=	gcc
CFLAGS=	-O2
PROGS=	fc-iram fc-loadtool fc-xram fc-compalram fc-buzplay fc-dspromdump \
	fc-simint

INSTALL_PREFIX=	/opt/freecalypso

INSTBIN=${INSTALL_PREFIX}/bin
INSTCONF=${INSTALL_PREFIX}/loadtools
INSTHELP=${INSTALL_PREFIX}/helpfiles

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

IRAM_OBJS=	compalload.o defexitstub.o defpath.o flashstubs.o hexdecode.o \
		hwparam.o romload.o secondprog.o sertool.o srecreader.o \
		ttypassthru.o

LOADTOOL_OBJS=	audump.o compalload.o crc32tab.o defpath.o flamdsec.o flashid.o\
		flashops.o flcmplboot.o flconf.o fldevs.o flerase.o flmain.o \
		flmisc.o flprogbin.o flprogsrec.o flprotreg.o flutil.o \
		hexdecode.o hwparam.o labaud.o lacrc32.o ltdispatch.o ltdump.o \
		ltexit.o lthelp.o ltmain.o ltmisc.o ltpassthru.o ltscript.o \
		romload.o srecreader.o tpinterf.o tpinterf2.o tpinterf3.o \
		tpinterfb.o

XRAM_OBJS=	chainload.o clmain.o compalload.o crc32tab.o defexitstub.o \
		defpath.o flashstubs.o hexdecode.o hwparam.o initscript.o \
		labaud.o lacrc32.o romload.o secondprog.o srecreader.o \
		tpinterf.o tpinterf2.o tpinterfb.o ttypassthru.o

BUZPLAY_OBJS=	bpdispatch.o bpmain.o bpunify.o buzplaybu.o buzplaypwt.o \
		compalload.o defpath.o flashstubs.o hexdecode.o hwparam.o \
		labaud.o ltexit.o ltpassthru.o romload.o srecreader.o tpinterf.o

ROMDUMP_OBJS=	compalload.o defpath.o flashstubs.o hexdecode.o hwparam.o \
		labaud.o ltexit.o romdump.o romload.o srecreader.o tpinterf.o \
		tpinterf2.o

SIMINT_OBJS=	compalload.o defexitstub.o defpath.o flashstubs.o hexdecode.o \
		hwparam.o labaud.o romload.o simatr.o simmain.o simup.o \
		srecreader.o tpinterf.o tpinterf2.o

LIBPWON=	../libpwon/libpwon.a
LIBSERIAL=	../libserial/libserial.a

all:	${PROGS}

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

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

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

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

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

fc-dspromdump:	${ROMDUMP_OBJS} ${LIBPWON} ${LIBSERIAL}
	${CC} ${CFLAGS} -o $@ ${ROMDUMP_OBJS} ${LIBPWON} ${LIBSERIAL}

fc-simint:	${SIMINT_OBJS} ${LIBPWON} ${LIBSERIAL}
	${CC} ${CFLAGS} -o $@ ${SIMINT_OBJS} ${LIBPWON} ${LIBSERIAL}

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}