-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
54 lines (44 loc) · 1.01 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
TOPDIR= $(shell git rev-parse --show-toplevel)
# Where we compile our .o
BUILDDIR= $(TOPDIR)/obj
ISODIR= $(TOPDIR)/iso
BAREFILE= $(ISODIR)/bare.img
# name of console font to use by default
KFONTNAME="cp866-8x16"
include mk/build-tools.mk
include mk/cflags.mk
#
# Defualt rule just prints "use build.sh"
# Using build.sh runs the build using the cross compiler in a docker container.
#
invalid:
echo "use build.sh"
#
###
#
c.img: $(BAREFILE)
@echo ""
@echo ""
@echo " Making c.img"
@rm -f c.img
@bximage -q -mode=create -hd=12M -imgmode=flat c.img c.img
@cat < $(BAREFILE) 1<>c.img
@chmod 644 c.img
@echo ""
@echo ""
@chown -R 1000.985 $(BUILDDIR) iso c.img
# @ls -l */*.img
# @echo ""
# @ls -l c.img
include mk/bare.mk
include mk/kernel.mk
include mk/boot.mk
clean:
@find . -name '*.o' -delete
@find . -name '*.a' -delete
@find . -name '*.raw' -delete
@find . -name '*.elf' -delete
@find . -name '*.psf' -delete
@find . -name '*.img' -delete
@echo "Cleaned build files"
-include $(DEPENDENCIES)