-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
36 lines (23 loc) · 821 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
all: rm-elf example.elf
KOS_CFLAGS+= -g -std=c99 -mpretend-cmove -fno-delayed-branch -fno-optimize-sibling-calls -funroll-all-loops -fexpensive-optimizations -fomit-frame-pointer -fstrict-aliasing -ffast-math
include $(KOS_BASE)/Makefile.rules
OBJS = example.o mpeg1.o profiler.o
KOS_LOCAL_CFLAGS = -I$(KOS_BASE)/addons/zlib
clean:
-rm -f example.elf $(OBJS)
-rm -f romdisk_boot.*
dist:
-rm -f $(OBJS)
-rm -f romdisk_boot.*
$(KOS_STRIP) example.elf
rm-elf:
-rm -f example.elf
-rm -f romdisk_boot.*
example.elf: $(OBJS) romdisk_boot.o
$(KOS_CC) $(KOS_CFLAGS) $(KOS_LDFLAGS) -o $@ $(KOS_START) $^ -lz -lm $(KOS_LIBS)
romdisk_boot.img:
$(KOS_GENROMFS) -f $@ -d romdisk_boot -v
romdisk_boot.o: romdisk_boot.img
$(KOS_BASE)/utils/bin2o/bin2o $< romdisk_boot $@
run: example.elf
$(KOS_LOADER) $<