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