]>
Commit | Line | Data |
---|---|---|
1da177e4 LT |
1 | # |
2 | # Makefile for some libs needed in the kernel. | |
3 | # | |
4 | ||
606576ce | 5 | ifdef CONFIG_FUNCTION_TRACER |
2464a609 IM |
6 | ORIG_CFLAGS := $(KBUILD_CFLAGS) |
7 | KBUILD_CFLAGS = $(subst -pg,,$(ORIG_CFLAGS)) | |
8 | endif | |
9 | ||
7a5c5d57 | 10 | lib-y := ctype.o string.o vsprintf.o cmdline.o \ |
1f5a2479 | 11 | rbtree.o radix-tree.o dump_stack.o timerqueue.o\ |
5a6dca7c | 12 | idr.o int_sqrt.o extable.o prio_tree.o \ |
bc0b96b5 | 13 | sha1.o md5.o irq_regs.o reciprocal_div.o argv_split.o \ |
ceacc2c1 | 14 | proportions.o prio_heap.o ratelimit.o show_mem.o \ |
63e424c8 | 15 | is_single_threaded.o plist.o decompress.o find_next_bit.o |
9a19fea4 | 16 | |
74588d8b | 17 | lib-$(CONFIG_MMU) += ioremap.o |
ccb46000 AM |
18 | lib-$(CONFIG_SMP) += cpumask.o |
19 | ||
5c5daf65 | 20 | lib-y += kobject.o kref.o klist.o |
1da177e4 | 21 | |
d3de851a | 22 | obj-y += bcd.o div64.o sort.o parser.o halfmd4.o debug_locks.o random32.o \ |
3c9f3681 | 23 | bust_spinlocks.o hexdump.o kasprintf.o bitmap.o scatterlist.o \ |
1a94dc35 | 24 | string_helpers.o gcd.o lcm.o list_sort.o uuid.o flex_array.o \ |
63e424c8 | 25 | bsearch.o find_last_bit.o |
33ee3b2e AD |
26 | obj-y += kstrtox.o |
27 | obj-$(CONFIG_TEST_KSTRTOX) += test-kstrtox.o | |
1da177e4 LT |
28 | |
29 | ifeq ($(CONFIG_DEBUG_KOBJECT),y) | |
30 | CFLAGS_kobject.o += -DDEBUG | |
31 | CFLAGS_kobject_uevent.o += -DDEBUG | |
32 | endif | |
33 | ||
5c5daf65 | 34 | lib-$(CONFIG_HOTPLUG) += kobject_uevent.o |
5ea81769 | 35 | obj-$(CONFIG_GENERIC_IOMAP) += iomap.o |
928923c7 GU |
36 | obj-$(CONFIG_HAS_IOMEM) += iomap_copy.o devres.o |
37 | obj-$(CONFIG_CHECK_SIGNATURE) += check_signature.o | |
cae2ed9a | 38 | obj-$(CONFIG_DEBUG_LOCKING_API_SELFTESTS) += locking-selftest.o |
fb1c8f93 | 39 | obj-$(CONFIG_DEBUG_SPINLOCK) += spinlock_debug.o |
1da177e4 LT |
40 | lib-$(CONFIG_RWSEM_GENERIC_SPINLOCK) += rwsem-spinlock.o |
41 | lib-$(CONFIG_RWSEM_XCHGADD_ALGORITHM) += rwsem.o | |
d61931d8 BP |
42 | |
43 | CFLAGS_hweight.o = $(subst $(quote),,$(CONFIG_ARCH_HWEIGHT_CFLAGS)) | |
702a28b1 | 44 | obj-$(CONFIG_GENERIC_HWEIGHT) += hweight.o |
d61931d8 | 45 | |
5db53f3e | 46 | obj-$(CONFIG_BTREE) += btree.o |
39c715b7 | 47 | obj-$(CONFIG_DEBUG_PREEMPT) += smp_processor_id.o |
199a9afc | 48 | obj-$(CONFIG_DEBUG_LIST) += list_debug.o |
3ac7fe5a | 49 | obj-$(CONFIG_DEBUG_OBJECTS) += debugobjects.o |
1da177e4 | 50 | |
7657ec1f | 51 | ifneq ($(CONFIG_HAVE_DEC_LOCK),y) |
1da177e4 LT |
52 | lib-y += dec_and_lock.o |
53 | endif | |
54 | ||
a5cfc1ec | 55 | obj-$(CONFIG_BITREVERSE) += bitrev.o |
8759ef32 | 56 | obj-$(CONFIG_RATIONAL) += rational.o |
1da177e4 | 57 | obj-$(CONFIG_CRC_CCITT) += crc-ccitt.o |
7657ec1f | 58 | obj-$(CONFIG_CRC16) += crc16.o |
f11f594e | 59 | obj-$(CONFIG_CRC_T10DIF)+= crc-t10dif.o |
3e7cbae7 | 60 | obj-$(CONFIG_CRC_ITU_T) += crc-itu-t.o |
1da177e4 | 61 | obj-$(CONFIG_CRC32) += crc32.o |
ad241528 | 62 | obj-$(CONFIG_CRC7) += crc7.o |
1da177e4 | 63 | obj-$(CONFIG_LIBCRC32C) += libcrc32c.o |
7150962d | 64 | obj-$(CONFIG_CRC8) += crc8.o |
f14f75b8 | 65 | obj-$(CONFIG_GENERIC_ALLOCATOR) += genalloc.o |
1da177e4 LT |
66 | |
67 | obj-$(CONFIG_ZLIB_INFLATE) += zlib_inflate/ | |
68 | obj-$(CONFIG_ZLIB_DEFLATE) += zlib_deflate/ | |
69 | obj-$(CONFIG_REED_SOLOMON) += reed_solomon/ | |
437aa565 | 70 | obj-$(CONFIG_BCH) += bch.o |
64c70b1c RP |
71 | obj-$(CONFIG_LZO_COMPRESS) += lzo/ |
72 | obj-$(CONFIG_LZO_DECOMPRESS) += lzo/ | |
24fa0402 | 73 | obj-$(CONFIG_XZ_DEC) += xz/ |
f5e70d0f | 74 | obj-$(CONFIG_RAID6_PQ) += raid6/ |
1da177e4 | 75 | |
889c92d2 PA |
76 | lib-$(CONFIG_DECOMPRESS_GZIP) += decompress_inflate.o |
77 | lib-$(CONFIG_DECOMPRESS_BZIP2) += decompress_bunzip2.o | |
78 | lib-$(CONFIG_DECOMPRESS_LZMA) += decompress_unlzma.o | |
3ebe1243 | 79 | lib-$(CONFIG_DECOMPRESS_XZ) += decompress_unxz.o |
cacb246f | 80 | lib-$(CONFIG_DECOMPRESS_LZO) += decompress_unlzo.o |
c8531ab3 | 81 | |
65df877a | 82 | obj-$(CONFIG_TEXTSEARCH) += textsearch.o |
df3fb93a | 83 | obj-$(CONFIG_TEXTSEARCH_KMP) += ts_kmp.o |
8082e4ed | 84 | obj-$(CONFIG_TEXTSEARCH_BM) += ts_bm.o |
6408f79c | 85 | obj-$(CONFIG_TEXTSEARCH_FSM) += ts_fsm.o |
3cbc5640 | 86 | obj-$(CONFIG_SMP) += percpu_counter.o |
e65e1fc2 | 87 | obj-$(CONFIG_AUDIT_GENERIC) += audit.o |
2de4ff7b | 88 | |
6c654b5f | 89 | obj-$(CONFIG_SWIOTLB) += swiotlb.o |
0291df8c | 90 | obj-$(CONFIG_IOMMU_HELPER) += iommu-helper.o |
6ff1cb35 | 91 | obj-$(CONFIG_FAULT_INJECTION) += fault-inject.o |
c9d221f8 | 92 | obj-$(CONFIG_CPU_NOTIFIER_ERROR_INJECT) += cpu-notifier-error-inject.o |
6c654b5f | 93 | |
7664c5a1 JF |
94 | lib-$(CONFIG_GENERIC_BUG) += bug.o |
95 | ||
bbc69863 RM |
96 | obj-$(CONFIG_HAVE_ARCH_TRACEHOOK) += syscall.o |
97 | ||
e9d376f0 | 98 | obj-$(CONFIG_DYNAMIC_DEBUG) += dynamic_debug.o |
346e15be | 99 | |
e9cc8bdd | 100 | obj-$(CONFIG_NLATTR) += nlattr.o |
346e15be | 101 | |
b411b363 PR |
102 | obj-$(CONFIG_LRU_CACHE) += lru_cache.o |
103 | ||
f2f45e5f JR |
104 | obj-$(CONFIG_DMA_API_DEBUG) += dma-debug.o |
105 | ||
26a28fa4 AB |
106 | obj-$(CONFIG_GENERIC_CSUM) += checksum.o |
107 | ||
09d4e0ed PM |
108 | obj-$(CONFIG_GENERIC_ATOMIC64) += atomic64.o |
109 | ||
86a89380 LB |
110 | obj-$(CONFIG_ATOMIC64_SELFTEST) += atomic64_test.o |
111 | ||
c5485a7e BR |
112 | obj-$(CONFIG_AVERAGE) += average.o |
113 | ||
c39649c3 BH |
114 | obj-$(CONFIG_CPU_RMAP) += cpu_rmap.o |
115 | ||
10f8113e AS |
116 | obj-$(CONFIG_CORDIC) += cordic.o |
117 | ||
f49f23ab HY |
118 | obj-$(CONFIG_LLIST) += llist.o |
119 | ||
1da177e4 LT |
120 | hostprogs-y := gen_crc32table |
121 | clean-files := crc32table.h | |
122 | ||
123 | $(obj)/crc32.o: $(obj)/crc32table.h | |
124 | ||
125 | quiet_cmd_crc32 = GEN $@ | |
126 | cmd_crc32 = $< > $@ | |
127 | ||
128 | $(obj)/crc32table.h: $(obj)/gen_crc32table | |
129 | $(call cmd,crc32) |