1 #
2# Makefile for some libs needed in the kernel.
3#
4# Note! Dependencies are done automagically by 'make dep', which also
5# removes any old dependencies. DON'T put your own dependencies here
6# unless it's something special (ie not a .c file).
7#
8
9L_TARGET := lib.a
10
11export-objs := cmdline.o dec_and_lock.o rwsem-spinlock.o rwsem.o \
12	       rbtree.o crc32.o firmware_class.o
13
14obj-y := errno.o ctype.o string.o vsprintf.o brlock.o cmdline.o \
15	 bust_spinlocks.o rbtree.o dump_stack.o
16
17obj-$(CONFIG_FW_LOADER) += firmware_class.o
18obj-$(CONFIG_RWSEM_GENERIC_SPINLOCK) += rwsem-spinlock.o
19obj-$(CONFIG_RWSEM_XCHGADD_ALGORITHM) += rwsem.o
20
21ifneq ($(CONFIG_HAVE_DEC_LOCK),y)
22  obj-y += dec_and_lock.o
23endif
24
25obj-$(CONFIG_CRC32)     += crc32.o
26
27subdir-$(CONFIG_ZLIB_INFLATE) += zlib_inflate
28subdir-$(CONFIG_ZLIB_DEFLATE) += zlib_deflate
29
30include $(TOPDIR)/drivers/net/Makefile.lib
31include $(TOPDIR)/drivers/usb/Makefile.lib
32include $(TOPDIR)/drivers/bluetooth/Makefile.lib
33include $(TOPDIR)/fs/Makefile.lib
34include $(TOPDIR)/net/bluetooth/bnep/Makefile.lib
35
36# Include the subdirs, if necessary.
37obj-y += $(join $(subdir-y),$(subdir-y:%=/%.o))
38
39
40include $(TOPDIR)/Rules.make
41
42crc32.o: crc32table.h
43
44gen_crc32table: gen_crc32table.c
45	$(HOSTCC) $(HOSTCFLAGS) -o $@ $<
46
47crc32table.h: gen_crc32table
48	./$< > $@
49