-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
72 lines (59 loc) · 2.43 KB
/
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
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
TARGET = 1ST_READ
include Makefile.common
OBJS += romdisk.o
OPTFLAGS=-O3 -fomit-frame-pointer -fno-delayed-branch -DDREAMCAST -Wall -Werror
KOS_CFLAGS+= $(OPTFLAGS)
KOS_ROMDISK_DIR = romdisk_boot
all: complete
complete: clean build_images build_develop
deploy: clean build_images to_romdisk build_deploy
build_images: copy_debug genlevels
copy_debug:
$(KOS_BASE)/utils/kmgenc/kmgenc -a4 $(wildcard assets/debug/*.png)
find assets/debug -name '*.kmg' | xargs $(KOS_BASE)/addons/libtari/tools/bin/kompressor
$(KOS_BASE)/utils/kmgenc/kmgenc -a4 $(wildcard assets/fonts/*.png)
find assets/fonts -name '*.kmg' | xargs $(KOS_BASE)/addons/libtari/tools/bin/kompressor
mkdir romdisk_boot
mkdir romdisk_boot/fonts
cp assets/fonts/* romdisk_boot/fonts
find romdisk_boot/fonts/ -name '*.png' | xargs rm -f
find romdisk_boot/fonts/ -name '*.kmg' | xargs rm -f
mkdir romdisk_boot/debug
cp assets/debug/*.pkg romdisk_boot/debug
mkdir filesystem
mkdir filesystem/assets
mkdir filesystem/logo
mkdir filesystem/effects
to_romdisk:
cp -r filesystem/* romdisk_boot
genlevels:
cp -r assets/* filesystem/assets
cp -r $(KOS_BASE)/addons/libtari/assets/logo/LOGO_DC.png filesystem/logo/LOGO_DC.png
cp -r $(KOS_BASE)/addons/libtari/assets/effects/* filesystem/effects
find filesystem/ -name '*.png' | xargs $(KOS_BASE)/utils/kmgenc/kmgenc -a4
find filesystem/ -name '*.kmg' | xargs $(KOS_BASE)/addons/libtari/tools/bin/kompressor
find filesystem/ -name '*.png' | xargs rm -f
find filesystem/ -name '*.kmg' | xargs rm -f
find filesystem/ -name '*.xcf' | xargs rm -f
find filesystem/ -name '*.wav' | xargs rm -f
find assets/ -name '*.wav' | xargs -I {} sox {} -b 16 filesystem/{}
mkdir romdisk_boot/effects
cp -r filesystem/effects romdisk_boot
clean:
-rm -f $(TARGET).elf $(OBJS)
-rm -f $(TARGET).BIN
-rm -f assets/debug/*.pkg
-rm -r -f romdisk_boot
-rm -r -f filesystem
-rm -f romdisk.img
build_develop: $(OBJS)
$(KOS_CC) $(KOS_CFLAGS) -DDEVELOP -I${KOS_BASE}/../extensions/include $(KOS_LDFLAGS) \
-o $(TARGET).elf $(KOS_START) \
$(OBJS) -lkmg $(OPTIONAL_LIBS) -lm -ltremor -ltari $(OBJEXTRA) $(KOS_LIBS)
$(KOS_OBJCOPY) -O binary $(TARGET).elf $(TARGET).BIN
build_deploy: $(OBJS)
$(KOS_CC) $(KOS_CFLAGS) -I${KOS_BASE}/../extensions/include $(KOS_LDFLAGS) \
-o $(TARGET).elf $(KOS_START) \
$(OBJS) -lkmg $(OPTIONAL_LIBS) -lm -ltremor -ltari $(OBJEXTRA) $(KOS_LIBS)
$(KOS_OBJCOPY) -O binary $(TARGET).elf $(TARGET).BIN
include $(KOS_BASE)/Makefile.rules