f4cb602c848b8b4ddf5c9999248fc3859a06b6c0
[akaros.git] / kern / src / Kbuild
1
2 $(src)/error.c: $(AKAROS_ROOT)/include/ros/errno.h
3         @echo "// This file was automatically generated not edit" > $(@)
4         @echo ""                               >> $(@)
5         @echo "const char *errno_strings[] = {" >> $(@)
6         @cat $(^) | $(AKAROS_ROOT)/scripts/parse_errno.sh >> $(@)
7         @echo "};"                             >> $(@)
8         @echo "const int MAX_ERRNO = sizeof(errno_strings)/sizeof(errno_strings[0]);" >> $(@)
9
10 $(src)/build_info.cid:
11         @echo `git rev-parse HEAD` > $(src)/build_info.cid.tmp
12         @if [ ! -f $(src)/build_info.cid ] || \
13                 [ `cmp -s $(src)/build_info.cid $(src)/build_info.cid.tmp` -ne 0 ]; then \
14                         cp $(src)/build_info.cid.tmp $(src)/build_info.cid; fi;
15         @rm -f $(src)/build_info.cid.tmp
16
17 $(src)/build_info.c: $(src)/build_info.cid
18 ifeq ($(BUILD_INFO_FILE),)
19                 @echo "/* Automatically generated. DO NOT EDIT! */" > $(@)
20                 @echo "" >> $(@)
21                 @echo "const char build_info_kernel_path[] = { \"$(KERNEL_ELF_PATH)\" };"\
22                         >> $(@)
23                 @echo "const char build_info_date[] = { \"`date`\" };"\
24                         >> $(@)
25                 @echo "const char build_info_host[] = { \"`hostname`\" };"\
26                         >> $(@)
27                 @echo "const char build_info_commitid[] = { \"`cat $(src)/build_info.cid`\" };"\
28                         >> $(@)
29                 @echo "const char build_info_version[] = { \"$(KERNELVERSION)\" };"\
30                         >> $(@)
31                 @echo "const char build_info_version_name[] = { \"$(VERNAME)\" };"\
32                         >> $(@)
33 else
34                 cp $(BUILD_INFO_FILE) $(@)
35 endif
36
37 clean-files += build_info.c build_info.cid error.c
38
39 obj-y                                           += alarm.o
40 obj-y                                           += apipe.o
41 obj-y                                           += arsc.o
42 obj-y                                           += atomic.o
43 obj-y                                           += bitmap.o
44 obj-y                                           += blockdev.o
45 obj-y                                           += build_info.o
46 obj-y                                           += ceq.o
47 obj-y                                           += colored_caches.o
48 obj-y                                           += completion.o
49 obj-y                                           += console.o
50 obj-y                                           += coreprov.o
51 obj-y                                           += ctype.o
52 obj-y                                           += devfs.o
53 obj-y                                           += dmapool.o
54 obj-y                                           += elf.o
55 obj-y                                           += env.o
56 obj-y                                           += err.o
57 obj-y                                           += error.o
58 obj-$(CONFIG_ETH_AUDIO)         += eth_audio.o
59 obj-y                                           += event.o
60 obj-y                                           += ext2fs.o
61 obj-y                                           += ex_table.o
62 obj-y                                           += fdtap.o
63 obj-$(CONFIG_COREALLOC_FCFS) += corealloc_fcfs.o
64 obj-y                                           += find_next_bit.o
65 obj-y                                           += find_last_bit.o
66 obj-y                                           += frontend.o
67 obj-y                                           += hashtable.o
68 obj-y                                           += hexdump.o
69 obj-y                                           += init.o
70 obj-y                                           += kdebug.o
71 obj-y                                           += kfs.o
72 obj-y                                           += kmalloc.o
73 obj-y                                           += kreallocarray.o
74 obj-y                                           += ktest/
75 obj-y                                           += kthread.o
76 obj-y                                           += manager.o
77 obj-y                                           += mm.o
78 obj-y                                           += monitor.o
79 obj-y                                           += multiboot.o
80 obj-y                                           += net/
81 obj-y                                           += ns/
82 obj-y                                           += profiler.o
83 obj-y                                           += page_alloc.o
84 obj-y                                           += pagemap.o
85 obj-y                                           += percpu.o
86 obj-y                                           += pmap.o
87 obj-y                                           += printf.o
88 obj-y                                           += printfmt.o
89 obj-y                                           += process.o
90 obj-y                                           += radix.o
91 obj-y                                           += readline.o
92 obj-y                                           += rendez.o
93 obj-y                                           += rwlock.o
94 obj-y                                           += scatterlist.o
95 obj-y                                           += schedule.o
96 obj-y                                           += slab.o
97 obj-y                                           += smallidpool.o
98 obj-y                                           += smp.o
99 obj-y                                           += string.o
100 obj-y                                           += strstr.o
101 obj-y                                           += syscall.o
102 obj-y                                           += taskqueue.o
103 obj-y                                           += time.o
104 obj-y                                           += trace.o
105 obj-y                                           += trap.o
106 obj-y                                           += ucq.o
107 obj-y                                           += umem.o
108 obj-y                                           += vfs.o
109 obj-y                                           += vsprintf.o