aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2003-06-07 00:54:35 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2003-06-07 00:54:35 -0700
commit1ffdd43733501712676a6a898c69608f2491d959 (patch)
tree9886c303e7718a2da1e1df4e0c0bdcccfa0f9193 /lib
parent046511a42eb3b5b7ededf7964be712069de5a8fe (diff)
downloadhistory-1ffdd43733501712676a6a898c69608f2491d959.tar.gz
[PATCH] be more flexible about creating library archives
New makefile variable introduced: lib-y The lib-y syntax allows you to do the usual tricks such as: lib-$(CONFIG_SMP) += percpu_counter.o A built-in.o is always present in a directory that list .o files in either obj-* or lib-*. In contrast, lib.a is made only when lib-y is defined. I also updated lib/Makefile, so that crc32.o is now always built-in if selected.
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/Makefile b/lib/Makefile
index 75af740c3743f8..897971cc9d1fc2 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -6,18 +6,17 @@
# unless it's something special (ie not a .c file).
#
-L_TARGET := lib.a
-obj-y := errno.o ctype.o string.o vsprintf.o cmdline.o \
+lib-y := errno.o ctype.o string.o vsprintf.o cmdline.o \
bust_spinlocks.o rbtree.o radix-tree.o dump_stack.o \
kobject.o idr.o
-obj-$(CONFIG_RWSEM_GENERIC_SPINLOCK) += rwsem-spinlock.o
-obj-$(CONFIG_RWSEM_XCHGADD_ALGORITHM) += rwsem.o
-obj-$(CONFIG_SMP) += percpu_counter.o
+lib-$(CONFIG_RWSEM_GENERIC_SPINLOCK) += rwsem-spinlock.o
+lib-$(CONFIG_RWSEM_XCHGADD_ALGORITHM) += rwsem.o
+lib-$(CONFIG_SMP) += percpu_counter.o
ifneq ($(CONFIG_HAVE_DEC_LOCK),y)
- obj-y += dec_and_lock.o
+ lib-y += dec_and_lock.o
endif
obj-$(CONFIG_CRC32) += crc32.o