xref: /openbmc/linux/lib/Makefile (revision 145ca25e)
11da177e4SLinus Torvalds#
21da177e4SLinus Torvalds# Makefile for some libs needed in the kernel.
31da177e4SLinus Torvalds#
41da177e4SLinus Torvalds
57a5c5d57SAlexey Dobriyanlib-y := ctype.o string.o vsprintf.o cmdline.o \
6cefc8be8SKirill Korotaev	 rbtree.o radix-tree.o dump_stack.o \
73927f2e8SStephen Hemminger	 idr.o int_sqrt.o bitmap.o extable.o prio_tree.o \
8145ca25eSPeter Zijlstra	 sha1.o irq_regs.o reciprocal_div.o argv_split.o \
9145ca25eSPeter Zijlstra	 proportions.o
109a19fea4Smochel@digitalimplant.org
1174588d8bSHaavard Skinnemoenlib-$(CONFIG_MMU) += ioremap.o
12ccb46000SAndrew Mortonlib-$(CONFIG_SMP) += cpumask.o
13ccb46000SAndrew Morton
145c5daf65SKay Sieverslib-y	+= kobject.o kref.o klist.o
151da177e4SLinus Torvalds
163927f2e8SStephen Hemmingerobj-y += div64.o sort.o parser.o halfmd4.o debug_locks.o random32.o \
177a5c5d57SAlexey Dobriyan	 bust_spinlocks.o hexdump.o kasprintf.o
181da177e4SLinus Torvalds
191da177e4SLinus Torvaldsifeq ($(CONFIG_DEBUG_KOBJECT),y)
201da177e4SLinus TorvaldsCFLAGS_kobject.o += -DDEBUG
211da177e4SLinus TorvaldsCFLAGS_kobject_uevent.o += -DDEBUG
221da177e4SLinus Torvaldsendif
231da177e4SLinus Torvalds
245c5daf65SKay Sieverslib-$(CONFIG_HOTPLUG) += kobject_uevent.o
255ea81769SAl Viroobj-$(CONFIG_GENERIC_IOMAP) += iomap.o
26928923c7SGeert Uytterhoevenobj-$(CONFIG_HAS_IOMEM) += iomap_copy.o devres.o
27928923c7SGeert Uytterhoevenobj-$(CONFIG_CHECK_SIGNATURE) += check_signature.o
28cae2ed9aSIngo Molnarobj-$(CONFIG_DEBUG_LOCKING_API_SELFTESTS) += locking-selftest.o
29fb1c8f93SIngo Molnarobj-$(CONFIG_DEBUG_SPINLOCK) += spinlock_debug.o
301da177e4SLinus Torvaldslib-$(CONFIG_RWSEM_GENERIC_SPINLOCK) += rwsem-spinlock.o
311da177e4SLinus Torvaldslib-$(CONFIG_RWSEM_XCHGADD_ALGORITHM) += rwsem.o
3252fdd089SBenjamin LaHaiselib-$(CONFIG_SEMAPHORE_SLEEPERS) += semaphore-sleepers.o
331da177e4SLinus Torvaldslib-$(CONFIG_GENERIC_FIND_NEXT_BIT) += find_next_bit.o
34702a28b1SRandy Dunlapobj-$(CONFIG_GENERIC_HWEIGHT) += hweight.o
351da177e4SLinus Torvaldsobj-$(CONFIG_LOCK_KERNEL) += kernel_lock.o
3677ba89c5SIngo Molnarobj-$(CONFIG_PLIST) += plist.o
3739c715b7SIngo Molnarobj-$(CONFIG_DEBUG_PREEMPT) += smp_processor_id.o
38199a9afcSDave Jonesobj-$(CONFIG_DEBUG_LIST) += list_debug.o
391da177e4SLinus Torvalds
401da177e4SLinus Torvaldsifneq ($(CONFIG_HAVE_DEC_LOCK),y)
411da177e4SLinus Torvalds  lib-y += dec_and_lock.o
421da177e4SLinus Torvaldsendif
431da177e4SLinus Torvalds
44a5cfc1ecSAkinobu Mitaobj-$(CONFIG_BITREVERSE) += bitrev.o
451da177e4SLinus Torvaldsobj-$(CONFIG_CRC_CCITT)	+= crc-ccitt.o
467657ec1fSEvgeniy Polyakovobj-$(CONFIG_CRC16)	+= crc16.o
473e7cbae7SIvo van Doornobj-$(CONFIG_CRC_ITU_T)	+= crc-itu-t.o
481da177e4SLinus Torvaldsobj-$(CONFIG_CRC32)	+= crc32.o
49ad241528SJan Nikitenkoobj-$(CONFIG_CRC7)	+= crc7.o
501da177e4SLinus Torvaldsobj-$(CONFIG_LIBCRC32C)	+= libcrc32c.o
51f14f75b8SJes Sorensenobj-$(CONFIG_GENERIC_ALLOCATOR) += genalloc.o
521da177e4SLinus Torvalds
531da177e4SLinus Torvaldsobj-$(CONFIG_ZLIB_INFLATE) += zlib_inflate/
541da177e4SLinus Torvaldsobj-$(CONFIG_ZLIB_DEFLATE) += zlib_deflate/
551da177e4SLinus Torvaldsobj-$(CONFIG_REED_SOLOMON) += reed_solomon/
5664c70b1cSRichard Purdieobj-$(CONFIG_LZO_COMPRESS) += lzo/
5764c70b1cSRichard Purdieobj-$(CONFIG_LZO_DECOMPRESS) += lzo/
581da177e4SLinus Torvalds
5965df877aSDavid S. Millerobj-$(CONFIG_TEXTSEARCH) += textsearch.o
60df3fb93aSThomas Grafobj-$(CONFIG_TEXTSEARCH_KMP) += ts_kmp.o
618082e4edSPablo Neira Ayusoobj-$(CONFIG_TEXTSEARCH_BM) += ts_bm.o
626408f79cSThomas Grafobj-$(CONFIG_TEXTSEARCH_FSM) += ts_fsm.o
633cbc5640SRavikiran G Thirumalaiobj-$(CONFIG_SMP) += percpu_counter.o
64e65e1fc2SAl Viroobj-$(CONFIG_AUDIT_GENERIC) += audit.o
652de4ff7bSThomas Graf
666c654b5fSJohn W. Linvilleobj-$(CONFIG_SWIOTLB) += swiotlb.o
676ff1cb35SAkinobu Mitaobj-$(CONFIG_FAULT_INJECTION) += fault-inject.o
686c654b5fSJohn W. Linville
697664c5a1SJeremy Fitzhardingelib-$(CONFIG_GENERIC_BUG) += bug.o
707664c5a1SJeremy Fitzhardinge
711da177e4SLinus Torvaldshostprogs-y	:= gen_crc32table
721da177e4SLinus Torvaldsclean-files	:= crc32table.h
731da177e4SLinus Torvalds
741da177e4SLinus Torvalds$(obj)/crc32.o: $(obj)/crc32table.h
751da177e4SLinus Torvalds
761da177e4SLinus Torvaldsquiet_cmd_crc32 = GEN     $@
771da177e4SLinus Torvalds      cmd_crc32 = $< > $@
781da177e4SLinus Torvalds
791da177e4SLinus Torvalds$(obj)/crc32table.h: $(obj)/gen_crc32table
801da177e4SLinus Torvalds	$(call cmd,crc32)
81