TOPSRC		= $(shell cd ../../..; pwd)
include $(TOPSRC)/target.mk

CFLAGS		+= -Werror -Wall

all:            chello stdarg lcd6

chello:         chello.o
		${CC} ${LDFLAGS} -o chello.elf chello.o ${LIBS}
		${OBJDUMP} -S chello.elf > chello.dis
		${SIZE} chello.elf
		${ELF2AOUT} chello.elf $@

tetris:         tetris.o
		${CC} ${LDFLAGS} -o tetris.elf tetris.o ${LIBS}
		${OBJDUMP} -S tetris.elf > tetris.dis
		${SIZE} tetris.elf
		${ELF2AOUT} tetris.elf $@

lcd6:           lcd6.o
		${CC} ${LDFLAGS} -o lcd6.elf lcd6.o ${LIBS}
		${OBJDUMP} -S lcd6.elf > lcd6.dis
		${SIZE} lcd6.elf
		${ELF2AOUT} lcd6.elf $@

clean:
		rm -f *.o *.elf ${MAN} chello stdarg lcd6 *.elf *.dis tags *~
