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 \ |
bd823821 | 15 | is_single_threaded.o plist.o decompress.o |
9a19fea4 | 16 | |
74588d8b | 17 | lib-$(CONFIG_MMU) += ioremap.o |
ccb46000 AM |
18 | lib-$(CONFIG_SMP) += cpumask.o |
19 | ||
4af679cd | 20 | lib-y += kobject.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 \ |
639b9e34 | 25 | bsearch.o find_last_bit.o find_next_bit.o llist.o memweight.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 |
66eab4df | 36 | obj-$(CONFIG_GENERIC_PCI_IOMAP) += pci_iomap.o |
928923c7 GU |
37 | obj-$(CONFIG_HAS_IOMEM) += iomap_copy.o devres.o |
38 | obj-$(CONFIG_CHECK_SIGNATURE) += check_signature.o | |
cae2ed9a | 39 | obj-$(CONFIG_DEBUG_LOCKING_API_SELFTESTS) += locking-selftest.o |
fb1c8f93 | 40 | obj-$(CONFIG_DEBUG_SPINLOCK) += spinlock_debug.o |
1da177e4 LT |
41 | lib-$(CONFIG_RWSEM_GENERIC_SPINLOCK) += rwsem-spinlock.o |
42 | lib-$(CONFIG_RWSEM_XCHGADD_ALGORITHM) += rwsem.o | |
d61931d8 BP |
43 | |
44 | CFLAGS_hweight.o = $(subst $(quote),,$(CONFIG_ARCH_HWEIGHT_CFLAGS)) | |
702a28b1 | 45 | obj-$(CONFIG_GENERIC_HWEIGHT) += hweight.o |
d61931d8 | 46 | |
5db53f3e | 47 | obj-$(CONFIG_BTREE) += btree.o |
39c715b7 | 48 | obj-$(CONFIG_DEBUG_PREEMPT) += smp_processor_id.o |
199a9afc | 49 | obj-$(CONFIG_DEBUG_LIST) += list_debug.o |
3ac7fe5a | 50 | obj-$(CONFIG_DEBUG_OBJECTS) += debugobjects.o |
1da177e4 | 51 | |
7657ec1f | 52 | ifneq ($(CONFIG_HAVE_DEC_LOCK),y) |
1da177e4 LT |
53 | lib-y += dec_and_lock.o |
54 | endif | |
55 | ||
a5cfc1ec | 56 | obj-$(CONFIG_BITREVERSE) += bitrev.o |
8759ef32 | 57 | obj-$(CONFIG_RATIONAL) += rational.o |
1da177e4 | 58 | obj-$(CONFIG_CRC_CCITT) += crc-ccitt.o |
7657ec1f | 59 | obj-$(CONFIG_CRC16) += crc16.o |
f11f594e | 60 | obj-$(CONFIG_CRC_T10DIF)+= crc-t10dif.o |
3e7cbae7 | 61 | obj-$(CONFIG_CRC_ITU_T) += crc-itu-t.o |
1da177e4 | 62 | obj-$(CONFIG_CRC32) += crc32.o |
ad241528 | 63 | obj-$(CONFIG_CRC7) += crc7.o |
1da177e4 | 64 | obj-$(CONFIG_LIBCRC32C) += libcrc32c.o |
7150962d | 65 | obj-$(CONFIG_CRC8) += crc8.o |
f14f75b8 | 66 | obj-$(CONFIG_GENERIC_ALLOCATOR) += genalloc.o |
1da177e4 LT |
67 | |
68 | obj-$(CONFIG_ZLIB_INFLATE) += zlib_inflate/ | |
69 | obj-$(CONFIG_ZLIB_DEFLATE) += zlib_deflate/ | |
70 | obj-$(CONFIG_REED_SOLOMON) += reed_solomon/ | |
437aa565 | 71 | obj-$(CONFIG_BCH) += bch.o |
64c70b1c RP |
72 | obj-$(CONFIG_LZO_COMPRESS) += lzo/ |
73 | obj-$(CONFIG_LZO_DECOMPRESS) += lzo/ | |
24fa0402 | 74 | obj-$(CONFIG_XZ_DEC) += xz/ |
f5e70d0f | 75 | obj-$(CONFIG_RAID6_PQ) += raid6/ |
1da177e4 | 76 | |
889c92d2 PA |
77 | lib-$(CONFIG_DECOMPRESS_GZIP) += decompress_inflate.o |
78 | lib-$(CONFIG_DECOMPRESS_BZIP2) += decompress_bunzip2.o | |
79 | lib-$(CONFIG_DECOMPRESS_LZMA) += decompress_unlzma.o | |
3ebe1243 | 80 | lib-$(CONFIG_DECOMPRESS_XZ) += decompress_unxz.o |
cacb246f | 81 | lib-$(CONFIG_DECOMPRESS_LZO) += decompress_unlzo.o |
c8531ab3 | 82 | |
65df877a | 83 | obj-$(CONFIG_TEXTSEARCH) += textsearch.o |
df3fb93a | 84 | obj-$(CONFIG_TEXTSEARCH_KMP) += ts_kmp.o |
8082e4ed | 85 | obj-$(CONFIG_TEXTSEARCH_BM) += ts_bm.o |
6408f79c | 86 | obj-$(CONFIG_TEXTSEARCH_FSM) += ts_fsm.o |
3cbc5640 | 87 | obj-$(CONFIG_SMP) += percpu_counter.o |
e65e1fc2 | 88 | obj-$(CONFIG_AUDIT_GENERIC) += audit.o |
2de4ff7b | 89 | |
6c654b5f | 90 | obj-$(CONFIG_SWIOTLB) += swiotlb.o |
0291df8c | 91 | obj-$(CONFIG_IOMMU_HELPER) += iommu-helper.o |
6ff1cb35 | 92 | obj-$(CONFIG_FAULT_INJECTION) += fault-inject.o |
8d438288 | 93 | obj-$(CONFIG_NOTIFIER_ERROR_INJECTION) += notifier-error-inject.o |
c9d221f8 | 94 | obj-$(CONFIG_CPU_NOTIFIER_ERROR_INJECT) += cpu-notifier-error-inject.o |
6c654b5f | 95 | |
7664c5a1 JF |
96 | lib-$(CONFIG_GENERIC_BUG) += bug.o |
97 | ||
bbc69863 RM |
98 | obj-$(CONFIG_HAVE_ARCH_TRACEHOOK) += syscall.o |
99 | ||
e9d376f0 | 100 | obj-$(CONFIG_DYNAMIC_DEBUG) += dynamic_debug.o |
346e15be | 101 | |
e9cc8bdd | 102 | obj-$(CONFIG_NLATTR) += nlattr.o |
346e15be | 103 | |
b411b363 PR |
104 | obj-$(CONFIG_LRU_CACHE) += lru_cache.o |
105 | ||
f2f45e5f JR |
106 | obj-$(CONFIG_DMA_API_DEBUG) += dma-debug.o |
107 | ||
26a28fa4 AB |
108 | obj-$(CONFIG_GENERIC_CSUM) += checksum.o |
109 | ||
09d4e0ed PM |
110 | obj-$(CONFIG_GENERIC_ATOMIC64) += atomic64.o |
111 | ||
86a89380 LB |
112 | obj-$(CONFIG_ATOMIC64_SELFTEST) += atomic64_test.o |
113 | ||
c5485a7e BR |
114 | obj-$(CONFIG_AVERAGE) += average.o |
115 | ||
c39649c3 BH |
116 | obj-$(CONFIG_CPU_RMAP) += cpu_rmap.o |
117 | ||
10f8113e AS |
118 | obj-$(CONFIG_CORDIC) += cordic.o |
119 | ||
75957ba3 TH |
120 | obj-$(CONFIG_DQL) += dynamic_queue_limits.o |
121 | ||
d9c46b18 | 122 | obj-$(CONFIG_MPILIB) += mpi/ |
5e8898e9 | 123 | obj-$(CONFIG_SIGNATURE) += digsig.o |
d9c46b18 | 124 | |
c6df4b17 DM |
125 | obj-$(CONFIG_CLZ_TAB) += clz_tab.o |
126 | ||
9c1c21a0 A |
127 | obj-$(CONFIG_DDR) += jedec_ddr_data.o |
128 | ||
2922585b | 129 | obj-$(CONFIG_GENERIC_STRNCPY_FROM_USER) += strncpy_from_user.o |
a08c5356 | 130 | obj-$(CONFIG_GENERIC_STRNLEN_USER) += strnlen_user.o |
2922585b | 131 | |
4ccf4bea WS |
132 | obj-$(CONFIG_STMP_DEVICE) += stmp_device.o |
133 | ||
1da177e4 LT |
134 | hostprogs-y := gen_crc32table |
135 | clean-files := crc32table.h | |
136 | ||
137 | $(obj)/crc32.o: $(obj)/crc32table.h | |
138 | ||
139 | quiet_cmd_crc32 = GEN $@ | |
140 | cmd_crc32 = $< > $@ | |
141 | ||
142 | $(obj)/crc32table.h: $(obj)/gen_crc32table | |
143 | $(call cmd,crc32) |