Normalzing Nakefiles

This commit is contained in:
Russell-S-Harper 2020-09-26 03:40:56 -04:00
parent ef15d3a291
commit b1a019a1c4
2 changed files with 13 additions and 10 deletions

View File

@ -1,17 +1,18 @@
TGT=common
XAPP=../xa-pre-process/xapp
system.obj: common.obj appl.obj
cat common.obj appl.obj > system.obj
system.obj: $(TGT).obj appl.obj
cat $(TGT).obj appl.obj > system.obj
common.obj: rom.h common.h common.asm
xa -C -M common.asm -l common.lbl -o common.obj
$(TGT).obj: rom.h $(TGT).h $(TGT).asm
xa -C -M $(TGT).asm -l $(TGT).lbl -o $(TGT).obj
appl.obj: rom.h macros.h globals.h appl.src
cpp -P appl.src | $(XAPP) > appl.asm
xa -C -M appl.asm -l appl.lbl -o appl.obj
globals.h: common.obj
grep -E '^(FN_XR|FN_0X|PLS_1|MNS_1|ADDR)' common.lbl | sed -e 's/, 0, 0x0000//' -e 's/, / = /' -e 's/ 0x/ \x24/' > globals.h
globals.h: $(TGT).obj
grep -E '^(FN_XR|FN_0X|PLS_1|MNS_1|ADDR)' $(TGT).lbl | sed -e 's/, 0, 0x0000//' -e 's/, / = /' -e 's/ 0x/ \x24/' > globals.h
clean:
rm -f globals.h appl.asm common.obj appl.obj common.lbl appl.lbl system.obj
rm -f globals.h appl.asm $(TGT).obj appl.obj $(TGT).lbl appl.lbl system.obj

View File

@ -1,5 +1,7 @@
emulator: emulator.h emulator.c main.c
gcc -o emulator emulator.c main.c
TGT=emulator
$(TGT): $(TGT).h $(TGT).c main.c
gcc -o $(TGT) $(TGT).c main.c
clean:
rm -f emulator
rm -f $(TGT)