Files
SyncHome/trunk/workspace/Z80/makefile
2023-03-13 08:36:51 +00:00

37 lines
1.5 KiB
Makefile

TARGET = main
CODE_LOC = --code-loc 0x0000
DATA_LOC = --data-loc 0x2000
STACK_LOC = --stack-loc 0x3FFF
lcd.rel: lcd.c lcd.h
sdcc -mz80 -c lcd.c
mycrt0.rel:
sdasz80 -o mycrt0.z80
clean:
-rm *.rel
build: lcd.rel mycrt0.rel
sdcc -mz80 $(DATA_LOC) --no-std-crt0 mycrt0.rel $(TARGET).c lcd.rel
#sdcc -mz80 $(CODE_LOC) $(DATA_LOC) $(TARGET).c
hex2bin $(TARGET).ihx
z80dasm -g 0 -l -a -z -o $(TARGET).z80 $(TARGET).bin
cat void.bin $(TARGET).bin > $(TARGET).sim.bin
all: build
#-mmcs51 Generate code for the Intel MCS51 family of processors. This is the default processor target.
#-mds390 Generate code for the Dallas DS80C390 processor.
#-mds400 Generate code for the Dallas DS80C400 processor.
#-mhc08 Generate code for the Freescale/Motorola HC08 (aka 68HC08) family of processors.
#-ms08 Generate code for the Freescale/Motorola S08 (aka 68HCS08, HCS08, CS08) family of processors.
#-mz80 Generate code for the Zilog Z80 family of processors.
#-mz180 Generate code for the Zilog Z180 family of processors.
#-mr2k Generate code for the Rabbit 2000 / Rabbit 3000 family of processors.
#-mr3ka Generate code for the Rabbit 3000A family of processors.
#-mgbz80 Generate code for the LR35902 GameBoy Z80 processor.
#-mstm8 Generate code for the STMicroelectronics STM8 family of processors.
#-mpic14 Generate code for the Microchip PIC 14-bit processors (p16f84 and variants. In development, not complete).
#-mpic16 Generate code for the Microchip PIC 16-bit processors (p18f452 and variants. In development, not complete).