source: mainline/src/Makefile@ 79f1f38f

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 79f1f38f was ed0dd65, checked in by Jakub Jermar <jakub@…>, 20 years ago

More ACPI work.
Initial MADT table parsing.

SMP renaming and reorganization to reflect there are more ways to bring SMP up.

  • Property mode set to 100644
File size: 1.7 KB
Line 
1include Makefile.config
2include ../arch/$(ARCH)/Makefile.inc
3
4sources=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 debug/print.c \
19 time/clock.c \
20 time/timeout.c \
21 time/delay.c \
22 synch/spinlock.c \
23 synch/condvar.c \
24 synch/rwlock.c \
25 synch/mutex.c \
26 synch/semaphore.c \
27 synch/waitq.c \
28 smp/ipi.c
29
30ifdef DEBUG_SPINLOCK
31CFLAGS+=-D$(DEBUG_SPINLOCK)
32endif
33
34ifdef USERSPACE
35CFLAGS+=-D$(USERSPACE)
36endif
37
38ifdef TEST
39test_objects:=$(addsuffix .o,$(basename ../test/$(TEST_DIR)/$(TEST_FILE)))
40CFLAGS+=-D$(TEST)
41endif
42arch_objects:=$(addsuffix .o,$(basename $(arch_sources)))
43objects:=$(addsuffix .o,$(basename $(sources)))
44
45.PHONY : all config depend build clean dist-clean boot
46
47all: dist-clean config depend build
48
49-include Makefile.depend
50
51config:
52 find . ../include -name arch -type l -exec rm \{\} \;
53 ln -s ../arch/$(ARCH)/src arch
54 ln -s ../arch/$(ARCH)/include ../include/arch
55
56depend:
57 $(CC) $(CPPFLAGS) -M $(arch_sources) $(sources) >Makefile.depend
58
59build: kernel.bin boot
60
61clean:
62 find . ../arch/$(ARCH)/src ../test -name '*.o' -exec rm \{\} \;
63 -rm *.bin kernel.map
64 $(MAKE) -C ../arch/$(ARCH)/boot clean
65
66dist-clean:
67 find . ../include -name arch -type l -exec rm \{\} \;
68 -rm Makefile.depend
69 -$(MAKE) clean
70
71kernel.bin: $(arch_objects) $(objects) $(test_objects)
72 $(LD) $(LFLAGS) $(arch_objects) $(objects) $(test_objects) -o $@ >kernel.map
73
74%.s: %.S
75 $(CC) $(CPPFLAGS) -E $< >$@
76
77%.o: %.s
78 $(AS) $< -o $@
79
80%.o: %.c
81 $(CC) $(CFLAGS) -c $< -o $@
82
83KS=`cat kernel.bin | wc -c`
84
85boot:
86 $(MAKE) -C ../arch/$(ARCH)/boot build KERNEL_SIZE=$(KS)
Note: See TracBrowser for help on using the repository browser.