forked from ReturnInfinity/Pure64
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
50 lines (37 loc) · 1.05 KB
/
Makefile
File metadata and controls
50 lines (37 loc) · 1.05 KB
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
VERSION ?= 0.9.0
export CROSS_COMPILE ?= x86_64-none-elf-
export HOST_CROSS_COMPILE ?=
export EXE ?=
.PHONY: all clean install
all clean install:
$(MAKE) -C include/pure64 $@
$(MAKE) -C src $@
$(MAKE) -C src/bootsectors $@
$(MAKE) -C src/targetlib $@
$(MAKE) -C src/hostlib $@
$(MAKE) -C src/stage-three $@
$(MAKE) -C src/util $@
pure64-$(VERSION).tar.gz: pure64-$(VERSION)
tar -pcvzf $@ $<
pure64-$(VERSION):
$(MAKE) install DESTDIR=$(PWD)/$@ PREFIX=/
.PHONY: test
test: test1
.PHONY: test1
test1: testing/test1.img
./test.sh $<
.PHONY: test2
test2: testing/test2.img
./test.sh $<
testing/test1.img: testing/test1-config.txt testing/kernel all
./src/util/pure64 --disk $@ --config $< init
testing/test2.img: testing/test2-config.txt testing/kernel all
./src/util/pure64 --disk $@ --config $< init
./src/util/pure64 --disk $@ --config $< cp testing/kernel /boot/kernel
testing/kernel.sys: testing/kernel
objcopy -O binary $< $@
testing/kernel: testing/kernel.o
ld $< -o $@
testing/kernel.o: testing/kernel.asm
nasm $< -f elf64 -o $@
$(V).SILENT: