-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
67 lines (47 loc) · 1.14 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
#! /usr/bin/make
INCLUDE=./include
include ./include/config.mk
main: tests libm.so libc.so
echo "compilation complete"
tests: test-loader test-file test-string test-proc test-assert test-memory test-math
echo "tests complete"
libc.so: libc.a arch/asm.a
$(SHARE)
libm.so: libm.a
$(SHARE)
test-loader:
$(MAKE) -is -C tests/loader/ test
test-file:
$(MAKE) -is -C tests/file/ test
test-assert:
$(MAKE) -is -C tests/assert/ test
test-string:
$(MAKE) -is -C tests/string/ test
test-proc:
$(MAKE) -is -C tests/proc/ test
test-memory:
$(MAKE) -is -C tests/memory/ test
test-math: libm.a
$(MAKE) -is -C tests/math/ test
libc.a: string.o file.o assert.o errno.o memory.o
$(AR)
libm.a: math.o
$(AR)
arch/asm.a:
$(MAKE) -C arch/ asm.a
%.o: %.c $(shell $(CC) -MM $< 2>/dev/null | cut -f 2 -d ':')
$(CMP)
include/stddef.h: ./errors
./bin/update-stddef errors >include/stddef.h
clean:
$(MAKE) -C arch/ clean
$(MAKE) -C tests/assert clean
$(MAKE) -C tests/file clean
$(MAKE) -C tests/string clean
$(MAKE) -C tests/proc clean
$(MAKE) -C tests/memory clean
$(MAKE) -C tests/loader clean
rm -f *.o
rm -f *.so
rm -f test-*
rm -f *.a