mirror of
https://codeberg.org/hkzlab/TK2048.git
synced 2025-12-29 08:42:16 +11:00
Import empty project
This commit is contained in:
parent
dddb278e87
commit
384d9b3fd1
15 changed files with 496 additions and 0 deletions
39
Makefile
Normal file
39
Makefile
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
VPATH = src
|
||||
|
||||
# Program output
|
||||
PRG=output
|
||||
|
||||
# Libraries
|
||||
LIBS=clib-6502.a
|
||||
|
||||
|
||||
# Common source files
|
||||
ASM_SRCS = tk2k_startup.s
|
||||
C_SRCS = main.c monitor_subroutines.c utility.c
|
||||
|
||||
# Object files
|
||||
OBJS = $(ASM_SRCS:%.s=%.o) $(C_SRCS:%.c=%.o)
|
||||
|
||||
all: $(PRG).wav
|
||||
|
||||
%.o: %.s
|
||||
as6502 --core=6502 --list-file=$(@:%.o=obj/%.lst) -o obj/$@ $<
|
||||
|
||||
%.o: %.c
|
||||
cc6502 --core=6502 -O2 --list-file=$(@:%.o=obj/%.lst) --char-is-unsigned --pedantic-errors -o obj/$@ $<
|
||||
|
||||
$(PRG).hex: $(OBJS)
|
||||
(cd obj ; ln6502 -g ../linker-files/linker.scm $^ -o ../out/$@ $(LIBS) -l --cross-reference --cstartup=tk2k --no-automatic-placement-rules --output-format intel-hex)
|
||||
|
||||
$(PRG).bin: $(PRG).hex
|
||||
(cd out ; objcopy -I ihex -O binary $(PRG).hex $(PRG).bin)
|
||||
|
||||
$(PRG).wav: $(PRG).bin
|
||||
(cd out ; c2t -3 $(PRG).bin,801 $(PRG).wav)
|
||||
|
||||
clean:
|
||||
-(cd obj ; rm $(OBJS) $(OBJS:%.o=%.lst))
|
||||
-rm obj/*.lst
|
||||
-rm out/*.hex
|
||||
-rm out/*.bin
|
||||
-rm out/*.wav
|
||||
Loading…
Add table
Add a link
Reference in a new issue