lfn
serial
ticket/834-toolchain-update
topic/msim-upgrade
topic/simplify-dev-export
Last change
on this file since dbe9ff0 was bcdd9aa, checked in by Jakub Jermar <jakub@…>, 20 years ago |
Add lib/the.c.
Add and deploy the_initialize() and the_copy().
Make IA-32's before_thread_runs() use SP_DELTA macro.
|
-
Property mode
set to
100644
|
File size:
1.8 KB
|
Line | |
---|
1 | include Makefile.config
|
---|
2 | include ../arch/$(ARCH)/Makefile.inc
|
---|
3 |
|
---|
4 | sources=cpu/cpu.c \
|
---|
5 | main/main.c \
|
---|
6 | main/kinit.c \
|
---|
7 | main/uinit.c \
|
---|
8 | proc/scheduler.c \
|
---|
9 | proc/thread.c \
|
---|
10 | proc/task.c \
|
---|
11 | mm/heap.c \
|
---|
12 | mm/frame.c \
|
---|
13 | mm/page.c \
|
---|
14 | mm/tlb.c \
|
---|
15 | mm/vm.c \
|
---|
16 | lib/func.c \
|
---|
17 | lib/list.c \
|
---|
18 | lib/memstr.c \
|
---|
19 | lib/the.c \
|
---|
20 | debug/print.c \
|
---|
21 | time/clock.c \
|
---|
22 | time/timeout.c \
|
---|
23 | time/delay.c \
|
---|
24 | preempt/preemption.c \
|
---|
25 | synch/spinlock.c \
|
---|
26 | synch/condvar.c \
|
---|
27 | synch/rwlock.c \
|
---|
28 | synch/mutex.c \
|
---|
29 | synch/semaphore.c \
|
---|
30 | synch/waitq.c \
|
---|
31 | smp/ipi.c \
|
---|
32 | fb/font-8x16.c
|
---|
33 |
|
---|
34 | ifdef DEBUG_SPINLOCK
|
---|
35 | CFLAGS+=-D$(DEBUG_SPINLOCK)
|
---|
36 | endif
|
---|
37 |
|
---|
38 | ifdef USERSPACE
|
---|
39 | CFLAGS+=-D$(USERSPACE)
|
---|
40 | endif
|
---|
41 |
|
---|
42 | ifdef TEST
|
---|
43 | test_objects:=$(addsuffix .o,$(basename ../test/$(TEST_DIR)/$(TEST_FILE)))
|
---|
44 | CFLAGS+=-D$(TEST)
|
---|
45 | endif
|
---|
46 | arch_objects:=$(addsuffix .o,$(basename $(arch_sources)))
|
---|
47 | objects:=$(addsuffix .o,$(basename $(sources)))
|
---|
48 |
|
---|
49 | .PHONY : all config depend build clean dist-clean boot
|
---|
50 |
|
---|
51 | all: dist-clean config depend build
|
---|
52 |
|
---|
53 | -include Makefile.depend
|
---|
54 |
|
---|
55 | config:
|
---|
56 | find . ../include -name arch -type l -exec rm \{\} \;
|
---|
57 | ln -s ../arch/$(ARCH)/src arch
|
---|
58 | ln -s ../arch/$(ARCH)/include ../include/arch
|
---|
59 |
|
---|
60 | depend:
|
---|
61 | $(CC) $(CPPFLAGS) -M $(arch_sources) $(sources) >Makefile.depend
|
---|
62 |
|
---|
63 | build: kernel.bin boot
|
---|
64 |
|
---|
65 | clean:
|
---|
66 | find . ../arch/$(ARCH)/src ../test -name '*.o' -exec rm \{\} \;
|
---|
67 | -rm *.bin kernel.map
|
---|
68 | $(MAKE) -C ../arch/$(ARCH)/boot clean
|
---|
69 |
|
---|
70 | dist-clean:
|
---|
71 | find . ../include -name arch -type l -exec rm \{\} \;
|
---|
72 | -rm Makefile.depend
|
---|
73 | -$(MAKE) clean
|
---|
74 |
|
---|
75 | kernel.bin: $(arch_objects) $(objects) $(test_objects)
|
---|
76 | $(LD) $(LFLAGS) $(arch_objects) $(objects) $(test_objects) -o $@ -Map kernel.map
|
---|
77 |
|
---|
78 | %.s: %.S
|
---|
79 | $(CC) $(CPPFLAGS) -E $< >$@
|
---|
80 |
|
---|
81 | %.o: %.s
|
---|
82 | $(AS) $(ASFLAGS) $< -o $@
|
---|
83 |
|
---|
84 | %.o: %.c
|
---|
85 | $(CC) $(CFLAGS) -c $< -o $@
|
---|
86 |
|
---|
87 | KS=`cat kernel.bin | wc -c`
|
---|
88 |
|
---|
89 | boot:
|
---|
90 | $(MAKE) -C ../arch/$(ARCH)/boot build KERNEL_SIZE=$(KS)
|
---|
Note:
See
TracBrowser
for help on using the repository browser.