Rev 914 | Rev 996 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 914 | Rev 928 | ||
---|---|---|---|
1 | CC = gcc |
1 | CC = gcc |
2 | FASM = fasm.exe |
2 | FASM = fasm.exe |
3 | 3 | ||
4 | INCLUDE = include/ |
4 | INCLUDE = include/ |
5 | 5 | ||
6 | DEFS = -DUSE_SMP -DCONFIG_DEBUG |
6 | DEFS = -DUSE_SMP -DCONFIG_DEBUG |
7 | 7 | ||
8 | CFLAGS = -c -O2 -I $(INCLUDE) -fomit-frame-pointer -fno-builtin |
8 | CFLAGS = -c -O2 -I $(INCLUDE) -fomit-frame-pointer -fno-builtin |
9 | LDFLAGS = -shared -s -Map kernel.map --image-base 0x100000 --file-alignment 32 |
9 | LDFLAGS = -shared -s -Map kernel.map --image-base 0x100000 --file-alignment 32 |
10 | 10 | ||
11 | KERNEL_SRC:= \ |
11 | KERNEL_SRC:= \ |
12 | kernel.asm \ |
12 | kernel.asm \ |
13 | data32.inc \ |
13 | data32.inc \ |
14 | core/memory.inc \ |
14 | core/memory.inc \ |
15 | core/heap.inc \ |
15 | core/heap.inc \ |
16 | core/malloc.inc \ |
16 | core/malloc.inc \ |
17 | core/taskman.inc \ |
17 | core/taskman.inc \ |
18 | core/v86.inc \ |
18 | core/v86.inc \ |
19 | core/sys32.inc \ |
19 | core/sys32.inc \ |
20 | core/dll.inc \ |
20 | core/dll.inc \ |
21 | core/exports.inc \ |
21 | core/exports.inc \ |
22 | fs/ntfs.inc \ |
22 | fs/ntfs.inc \ |
23 | gui/window.inc \ |
23 | gui/window.inc \ |
24 | gui/event.inc \ |
24 | gui/event.inc \ |
25 | video/vesa20.inc \ |
25 | video/vesa20.inc \ |
26 | video/cursors.inc |
26 | video/cursors.inc |
27 | 27 | ||
28 | 28 | ||
29 | PE_SRC:= \ |
29 | PE_SRC:= \ |
30 | init.c \ |
30 | init.asm \ |
31 | mm.c \ |
31 | mbi.c \ |
- | 32 | mm.c \ |
|
32 | slab.c \ |
33 | slab.c \ |
33 | heap.c \ |
34 | heap.c \ |
34 | pe.c \ |
35 | pe.c \ |
35 | dll.c \ |
36 | dll.c \ |
36 | spinlock.c \ |
37 | spinlock.c \ |
37 | boot/boot.asm \ |
38 | thread.c \ |
- | 39 | syscall.asm \ |
|
- | 40 | boot/boot.asm \ |
|
38 | boot/start.asm |
41 | boot/start.asm |
39 | 42 | ||
40 | 43 | ||
41 | H_SRC:= \ |
44 | H_SRC:= \ |
42 | include/types.h \ |
45 | include/types.h \ |
43 | include/atomic.h \ |
46 | include/atomic.h \ |
44 | include/spinlock.h \ |
47 | include/spinlock.h \ |
45 | include/link.h \ |
48 | include/link.h \ |
46 | include/core.h \ |
49 | include/core.h \ |
47 | include/mm.h \ |
50 | include/mm.h \ |
48 | include/pe.h \ |
51 | include/pe.h \ |
49 | include/slab.h |
52 | include/slab.h |
50 | 53 | ||
51 | PE_OBJS = $(patsubst %.s, bin/%.obj, $(patsubst %.asm, bin/%.obj,\ |
54 | PE_OBJS = $(patsubst %.s, bin/%.obj, $(patsubst %.asm, bin/%.obj,\ |
52 | $(patsubst %.c, bin/%.obj, $(PE_SRC)))) |
55 | $(patsubst %.c, bin/%.obj, $(PE_SRC)))) |
53 | 56 | ||
54 | 57 | ||
55 | all: kernel.gz |
58 | all: kernel.gz |
56 | 59 | ||
57 | kernel.gz :kernel.mnt |
60 | kernel.gz :kernel.mnt |
58 | 7z a -tgzip kernel.gz kernel.mnt |
61 | 7z a -tgzip kernel.gz kernel.mnt |
59 | 62 | ||
60 | kernel.mnt: kernel.obj bin/export.obj $(PE_OBJS) Makefile ld.x |
63 | kernel.mnt: kernel.obj bin/export.obj $(PE_OBJS) Makefile ld.x |
61 | ld $(LDFLAGS) -T ld.x -o $@ kernel.obj bin/export.obj $(PE_OBJS) |
64 | ld $(LDFLAGS) -T ld.x -o $@ kernel.obj bin/export.obj $(PE_OBJS) |
62 | 65 | ||
63 | bin/%.obj : core/%.c $(H_SRC) Makefile |
66 | bin/%.obj : core/%.c $(H_SRC) Makefile |
64 | $(CC) $(CFLAGS) -o $@ $< |
67 | $(CC) $(CFLAGS) -o $@ $< |
65 | 68 | ||
- | 69 | bin/%.obj: core/%.asm Makefile |
|
- | 70 | $(FASM) $< $@ |
|
- | 71 | ||
66 | bin/%.obj: %.asm |
72 | bin/%.obj: %.asm |
67 | $(FASM) $< $@ |
73 | $(FASM) $< $@ |
68 | 74 | ||
69 | bin/export.obj: core/export.asm |
75 | bin/export.obj: core/export.asm |
70 | as -o $@ $< |
76 | as -o $@ $< |
71 | 77 | ||
72 | kernel.obj: $(KERNEL_SRC) |
78 | kernel.obj: $(KERNEL_SRC) |
73 | $(FASM) kernel.asm |
79 | $(FASM) kernel.asm |
74 | 80 | ||
75 | all: $(SUBDIRS) |
81 | all: $(SUBDIRS) |
76 | 82 | ||
77 | .PHONY: all>> |
83 | .PHONY: all>>> |
78 | > |
84 | |
- | 85 | bin/%.obj:> |