-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathapp_make.txt
84 lines (65 loc) · 2.1 KB
/
app_make.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
TOOLPATH = ../../z_tools/
INCPATH = ../../z_tools/haribote/
APILIBPATH = ../apilib/
HARIBOTEPATH = ../haribote/
MAKE = $(TOOLPATH)make -r
NASK = $(TOOLPATH)nask
CC1 = $(TOOLPATH)gocc1 -I$(INCPATH) -I../ -Os -Wall -quiet
GAS2NASK = $(TOOLPATH)gas2nask -a
OBJ2BIM = $(TOOLPATH)obj2bim
MAKEFONT = $(TOOLPATH)makefont
BIN2OBJ = $(TOOLPATH)bin2obj
BIM2HRB = $(TOOLPATH)bim2hrb
BIM2BIN = $(TOOLPATH)bim2bin
RULEFILE = ../haribote.rul
EDIMG = $(TOOLPATH)edimg
IMGTOL = $(TOOLPATH)imgtol.com
GOLIB = $(TOOLPATH)golib00
HARITOL = $(TOOLPATH)haritol
COPY = $(HARITOL) copy
DEL = $(HARITOL) remove
CLEAN_FILES := $(wildcard *.lst *.obj *.map *.bim *.org)
# デフォルト動作
default :
$(MAKE) $(APP).hrb
# ファイル生成規則
$(APP).bim : $(APP).obj $(APILIBPATH)apilib.lib Makefile ../app_make.txt
$(OBJ2BIM) @$(RULEFILE) out:$(APP).bim map:$(APP).map stack:$(STACK) \
$(APP).obj $(APILIBPATH)apilib.lib
haribote.img : ../haribote/ipl20.bin ../haribote/haribote.sys $(APP).hrb \
Makefile ../app_make.txt
$(EDIMG) imgin:../../z_tools/fdimg0at.tek \
wbinimg src:../haribote/ipl20.bin len:512 from:0 to:0 \
copy from:../haribote/haribote.sys to:@: \
copy from:$(APP).hrb to:@: \
copy from:../nihongo/nihongo.fnt to:@: \
imgout:haribote.img
# 一般規則
%.gas : %.c ../apilib.h Makefile ../app_make.txt
$(CC1) -o $*.gas $*.c
%.nas : %.gas Makefile ../app_make.txt
$(GAS2NASK) $*.gas $*.nas
%.obj : %.nas Makefile ../app_make.txt
$(NASK) $*.nas $*.obj $*.lst
%.org : %.bim Makefile ../app_make.txt
$(BIM2HRB) $*.bim $*.org $(MALLOC)
%.hrb : %.org Makefile ../app_make.txt
$(BIM2BIN) -osacmp in:$*.org out:$*.hrb
# コマンド
run :
$(MAKE) haribote.img
$(HARITOL) concat ..\..\z_tools\qemu\fdimage0.bin haribote.img
$(MAKE) -C ../../z_tools/qemu
full :
$(MAKE) -C $(APILIBPATH)
$(MAKE) $(APP).hrb
run_full :
$(MAKE) -C $(APILIBPATH)
$(MAKE) -C ../haribote
$(MAKE) run
clean :
-$(HARITOL) remove $(CLEAN_FILES)
-$(DEL) haribote.img
src_only :
$(MAKE) clean
-$(DEL) $(APP).hrb