Skip to content

Commit

Permalink
简化 Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
yourtion committed Sep 12, 2014
1 parent 54036bf commit d946717
Showing 1 changed file with 15 additions and 36 deletions.
51 changes: 15 additions & 36 deletions 06_day/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 1,5 @@
OBJS_BOOTPACK = bootpack.obj naskfunc.obj hankaku.obj graphic.obj dsctbl.obj

TOOLPATH = ../z_tools/
INCPATH = ../z_tools/haribote/

Expand Down Expand Up @@ -28,45 30,15 @@ ipl10.bin : ipl10.nas Makefile
asmhead.bin : asmhead.nas Makefile
$(NASK) asmhead.nas asmhead.bin asmhead.lst

bootpack.gas : bootpack.c Makefile
$(CC1) -o bootpack.gas bootpack.c

bootpack.nas : bootpack.gas Makefile
$(GAS2NASK) bootpack.gas bootpack.nas

bootpack.obj : bootpack.nas Makefile
$(NASK) bootpack.nas bootpack.obj bootpack.lst

naskfunc.obj : naskfunc.nas Makefile
$(NASK) naskfunc.nas naskfunc.obj naskfunc.lst

hankaku.bin : hankaku.txt Makefile
$(MAKEFONT) hankaku.txt hankaku.bin

hankaku.obj : hankaku.bin Makefile
$(BIN2OBJ) hankaku.bin hankaku.obj _hankaku

graphic.gas : graphic.c Makefile
$(CC1) -o graphic.gas graphic.c

graphic.nas : graphic.gas Makefile
$(GAS2NASK) graphic.gas graphic.nas

graphic.obj : graphic.nas Makefile
$(NASK) graphic.nas graphic.obj graphic.lst

dsctbl.gas : dsctbl.c Makefile
$(CC1) -o dsctbl.gas dsctbl.c

dsctbl.nas : dsctbl.gas Makefile
$(GAS2NASK) dsctbl.gas dsctbl.nas

dsctbl.obj : dsctbl.nas Makefile
$(NASK) dsctbl.nas dsctbl.obj dsctbl.lst

bootpack.bim : bootpack.obj naskfunc.obj hankaku.obj graphic.obj dsctbl.obj Makefile
bootpack.bim : $(OBJS_BOOTPACK) Makefile
$(OBJ2BIM) @$(RULEFILE) out:bootpack.bim stack:3136k map:bootpack.map \
bootpack.obj naskfunc.obj hankaku.obj graphic.obj dsctbl.obj
$(OBJS_BOOTPACK)
# 3MB 64KB=3136KB

bootpack.hrb : bootpack.bim Makefile
Expand All @@ -83,6 55,17 @@ haribote.img : ipl10.bin haribote.sys Makefile

# 其他指令

%.gas : %.c Makefile
$(CC1) -o $*.gas $*.c

%.nas : %.gas Makefile
$(GAS2NASK) $*.gas $*.nas

%.obj : %.nas Makefile
$(NASK) $*.nas $*.obj $*.lst

# �R�}���h

img :
$(MAKE) haribote.img

Expand All @@ -98,11 81,7 @@ install :
clean :
-$(DEL) *.bin
-$(DEL) *.lst
-$(DEL) *.gas
-$(DEL) *.obj
-$(DEL) bootpack.nas
-$(DEL) graphic.nas
-$(DEL) dsctbl.nas
-$(DEL) bootpack.map
-$(DEL) bootpack.bim
-$(DEL) bootpack.hrb
Expand Down

0 comments on commit d946717

Please sign in to comment.