2023-01-20 14:39:58 +01:00
|
|
|
RYFS := $(CURDIR)/meta/ryfs/ryfs.py
|
|
|
|
FOX32ASM := ../fox32asm/target/release/fox32asm
|
|
|
|
GFX2INC := ../tools/gfx2inc/target/release/gfx2inc
|
|
|
|
|
|
|
|
IMAGE_SIZE := 16777216
|
|
|
|
BOOTLOADER := bootloader/bootloader.bin
|
|
|
|
|
|
|
|
all: fox32os.img
|
|
|
|
|
|
|
|
base_image:
|
|
|
|
mkdir -p base_image
|
|
|
|
|
2023-01-21 11:52:30 +01:00
|
|
|
base_image/kernel.fxf: kernel/main.asm $(wildcard kernel/*.asm kernel/*/*.asm)
|
2023-01-20 14:39:58 +01:00
|
|
|
$(FOX32ASM) $< $@
|
|
|
|
|
2023-01-21 11:52:30 +01:00
|
|
|
base_image/sh.fxf: applications/sh/main.asm $(wildcard applications/sh/*.asm applications/sh/*/*.asm)
|
|
|
|
echo $(wildcard applications/sh/**/*.asm)
|
2023-01-21 09:17:10 +01:00
|
|
|
$(FOX32ASM) $< $@
|
|
|
|
|
2023-01-20 14:39:58 +01:00
|
|
|
base_image/barclock.fxf: applications/barclock/main.asm
|
|
|
|
$(FOX32ASM) $< $@
|
|
|
|
|
2023-01-21 11:52:30 +01:00
|
|
|
base_image/terminal.fxf: applications/terminal/main.asm $(wildcard applications/terminal/*.asm)
|
2023-01-20 14:39:58 +01:00
|
|
|
$(FOX32ASM) $< $@
|
|
|
|
|
2023-02-02 03:18:08 +01:00
|
|
|
base_image/serial.fxf: applications/serial/main.asm $(wildcard applications/terminal/*.asm)
|
|
|
|
$(FOX32ASM) $< $@
|
|
|
|
|
2023-01-20 14:39:58 +01:00
|
|
|
base_image/foxpaint.fxf: applications/foxpaint/main.asm
|
|
|
|
$(FOX32ASM) $< $@
|
|
|
|
|
|
|
|
base_image/bg.fxf: applications/bg/main.asm
|
|
|
|
$(FOX32ASM) $< $@
|
|
|
|
|
|
|
|
base_image/bg.raw: applications/bg/bg.inc
|
|
|
|
$(FOX32ASM) $< $@
|
|
|
|
|
|
|
|
applications/bg/bg.inc: applications/bg/bg.png
|
|
|
|
$(GFX2INC) 640 480 $< $@
|
|
|
|
|
2023-01-25 02:08:27 +01:00
|
|
|
base_image/launcher.fxf: applications/launcher/main.asm $(wildcard applications/launcher/*.asm) applications/launcher/icons.inc
|
|
|
|
$(FOX32ASM) $< $@
|
|
|
|
|
|
|
|
applications/launcher/icons.inc: applications/launcher/icons.png
|
|
|
|
$(GFX2INC) 16 16 $< $@
|
|
|
|
|
2023-01-21 11:52:30 +01:00
|
|
|
bootloader/bootloader.bin: bootloader/main.asm $(wildcard bootloader/*.asm)
|
2023-01-20 14:39:58 +01:00
|
|
|
$(FOX32ASM) $< $@
|
|
|
|
|
2023-01-30 20:43:59 +01:00
|
|
|
base_image/startup.cfg: base_image/startup.cfg.default
|
|
|
|
cp $< $@
|
|
|
|
|
2023-01-20 14:39:58 +01:00
|
|
|
FILES = \
|
2023-01-30 20:43:59 +01:00
|
|
|
base_image/startup.cfg \
|
2023-01-20 14:39:58 +01:00
|
|
|
base_image/kernel.fxf \
|
2023-01-21 09:17:10 +01:00
|
|
|
base_image/sh.fxf \
|
2023-01-20 14:39:58 +01:00
|
|
|
base_image/barclock.fxf \
|
|
|
|
base_image/terminal.fxf \
|
2023-02-02 03:18:08 +01:00
|
|
|
base_image/serial.fxf \
|
2023-01-20 14:39:58 +01:00
|
|
|
base_image/foxpaint.fxf \
|
|
|
|
base_image/bg.fxf \
|
2023-01-25 02:08:27 +01:00
|
|
|
base_image/bg.raw \
|
|
|
|
base_image/launcher.fxf
|
2023-01-20 14:39:58 +01:00
|
|
|
|
|
|
|
fox32os.img: $(BOOTLOADER) $(FILES)
|
2023-02-01 20:32:17 +01:00
|
|
|
$(RYFS) -s $(IMAGE_SIZE) -l fox32os -b $(BOOTLOADER) create $@.tmp
|
|
|
|
for file in $(FILES); do $(RYFS) add $@.tmp $$file; done
|
|
|
|
mv $@.tmp $@
|