-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
46 lines (35 loc) · 908 Bytes
/
Makefile
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
IMG := jos.vfd
SYS := ./system/jos.sys
IPL := ./system/ipl.bin
APP := $(wildcard ./app/*.je)
TOOLPATH := ./build_tools/
EDIMG := $(TOOLPATH)edimg.exe
RULEFILE := $(TOOLPATH)jos.rul
IMGTOL := $(TOOLPATH)imgtol.com
QEMUPATH := $(TOOLPATH)qemu/
QEMU := $(QEMUPATH)qemu.exe
###
.PHONY:
default clean img run system app
default: run
clean:
@cd system && make clean
@cd app && make clean
-@del *.img *.vfd
img:
@cd system && make
@cd app && make
@make $(IMG)
run: img
@set SDL_VIDEODRIVER=windib
@set QEMU_AUDIO_DRV=none
@set QEMU_AUDIO_LOG_TO_MONITOR=0
@$(QEMU) -fda $(IMG) -L $(QEMUPATH) -m 32 -localtime -std-vga
###
$(IMG): $(APP) $(SYS) $(IPL) Makefile
@$(EDIMG) imgin:$(TOOLPATH)fdimg0at.tek \
wbinimg src:$(IPL) len:512 from:0 to:0 \
copy from:$(SYS) to:@: \
copy from:Makefile to:@: \
$(patsubst %.je,copy from:%.je to:@:,$(APP)) \
imgout:$(IMG)