Create a gist now

Instantly share code, notes, and snippets.

@plainspooky /Makefile Secret
Last active Sep 19, 2016

What would you like to do?
Makefile de exemplo para utilizar com o SDCC para produzir binários de MSX-DOS (não se esqueça de editar INFILE e OUTFILE)
CAT=cat
CC=sdcc
ECHO=echo
EMULATOR=openmsx
HEXBIN=../bin/hexbin.py
MKDISK=
RM=rm
INFILE=hello.c
OUTFILE=hello
INCLUDE=-I../msx
PARAMS=-mz80 --no-std-crt0 --data-loc 0
NORMAL=--code-loc 0x107 ../msx/crt0msx_msxdos.rel
ADVANCED=--code-loc 0x178 ../msx/crt0msx_msxdos_advanced.rel
RELOCATE=../msx/putchar.rel ../msx/getchar.rel ../msx/dos.rel ../msx/conio.rel
.PHONY: normal advanced clean superclean
default:
make advanced
normal:
${CC} ${INCLUDE} ${PARAMS} ${NORMAL} ${RELOCATE} ${INFILE}
${HEXBIN} ${OUTFILE}.ihx >${OUTFILE}.com
advanced:
${CC} ${INCLUDE} ${PARAMS} ${ADVANCED} ${RELOCATE} ${INFILE}
${HEXBIN} ${OUTFILE}.ihx >${OUTFILE}.com
clean:
${RM} ${OUTFILE}.com ${OUTFILE}.ihx
superclean:
${RM} -f ${OUTFILE}.asm ${OUTFILE.com ${OUTFILE}.ihx ${OUTFILE}.lk ${OUTFILE}.lst ${OUTFILE}.map ${OUTFILE}.noi ${OUTFILE}.rel ${OUTFILE}.sym
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment