-
-
Save plainspooky/d60a255c9621a6226820 to your computer and use it in GitHub Desktop.
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)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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