root / prex-0.9.0 / sys / Makefile @ 03e9c04a
History | View | Annotate | Download (1015 Bytes)
1 | 03e9c04a | Brad Neuman | # Rules to compile kernel |
---|---|---|---|
2 | |||
3 | include $(SRCDIR)/mk/own.mk |
||
4 | |||
5 | TARGET:= prex |
||
6 | |||
7 | #MAP:= prex.map |
||
8 | #DISASM:= prex.lst |
||
9 | #SYMBOL:= prex.sym |
||
10 | |||
11 | _KERNEL_:= 1 |
||
12 | DEFS+= KERNEL |
||
13 | |||
14 | SRCS+= kern/main.c \ |
||
15 | kern/sched.c \ |
||
16 | kern/task.c \ |
||
17 | kern/thread.c \ |
||
18 | kern/timer.c \ |
||
19 | kern/sysent.c \ |
||
20 | kern/irq.c \ |
||
21 | kern/device.c \ |
||
22 | kern/exception.c \ |
||
23 | kern/system.c \ |
||
24 | mem/kmem.c \ |
||
25 | mem/page.c \ |
||
26 | ipc/msg.c \ |
||
27 | ipc/object.c \ |
||
28 | sync/cond.c \ |
||
29 | sync/mutex.c \ |
||
30 | sync/sem.c \ |
||
31 | lib/queue.c \ |
||
32 | lib/string.c \ |
||
33 | lib/vsprintf.c |
||
34 | |||
35 | ifeq ($(CONFIG_MMU),y) |
||
36 | SRCS+= mem/vm.c |
||
37 | else |
||
38 | SRCS+= mem/vm_nommu.c |
||
39 | endif |
||
40 | |||
41 | ifeq ($(DEBUG),1) |
||
42 | SRCS+= kern/debug.c |
||
43 | endif |
||
44 | |||
45 | HAL:= $(SRCDIR)/bsp/hal/hal.o |
||
46 | LIBSDIR+= $(SRCDIR)/conf |
||
47 | INCSDIR+= $(CURDIR)/include $(SRCDIR)/bsp/hal/$(ARCH)/include |
||
48 | ifndef LDSCRIPT |
||
49 | LDSCRIPT:= $(SRCDIR)/bsp/hal/$(ARCH)/arch/kern.ld |
||
50 | endif |
||
51 | |||
52 | include $(SRCDIR)/mk/common.mk |
||
53 | |||
54 | $(TARGET): $(OBJS) $(HAL) $(LDSCRIPT) |
||
55 | $(call echo-file,LD ,$@) |
||
56 | $(LD) $(LDFLAGS) $(OUTPUT_OPTION) $(HAL) $(OBJS) $(PLATFORM_LIBS) |
||
57 | $(ASMGEN) |
||
58 | $(SYMGEN) |
||
59 | $(STRIP) -s $@ |