blob: 86ca1a6ec1db0b16e2c3a036ddf3ba977ed034e2 [file] [log] [blame]
wdenk87e33a62002-07-20 18:56:22 +00001#
Marian Balakowiczf9328632006-09-01 19:49:50 +02002# (C) Copyright 2000-2006
wdenk87e33a62002-07-20 18:56:22 +00003# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4#
5# See file CREDITS for list of people who contributed to this
6# project.
7#
8# This program is free software; you can redistribute it and/or
9# modify it under the terms of the GNU General Public License as
10# published by the Free Software Foundation; either version 2 of
11# the License, or (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with this program; if not, write to the Free Software
20# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21# MA 02111-1307 USA
22#
23
24include $(TOPDIR)/config.mk
25
Sebastien Carlier6d8962e2010-11-05 15:48:07 +010026LIB = $(obj)libgeneric.o
wdenk87e33a62002-07-20 18:56:22 +000027
Aneesh V05bad4a2011-07-13 05:11:06 +000028ifndef CONFIG_SPL_BUILD
Kumar Gala63240ba2008-12-13 17:20:28 -060029COBJS-$(CONFIG_ADDR_MAP) += addr_map.o
Christian Hitz4c6de852011-10-12 09:31:59 +020030COBJS-$(CONFIG_BCH) += bch.o
Yen Lin5b1a5452012-04-05 11:54:58 +000031COBJS-$(CONFIG_AES) += aes.o
Mike Frysingerab76e982009-02-05 21:04:50 -050032COBJS-$(CONFIG_BZIP2) += bzlib.o
33COBJS-$(CONFIG_BZIP2) += bzlib_crctable.o
34COBJS-$(CONFIG_BZIP2) += bzlib_decompress.o
35COBJS-$(CONFIG_BZIP2) += bzlib_randtable.o
36COBJS-$(CONFIG_BZIP2) += bzlib_huffman.o
Peter Tyser9ef78512009-11-09 15:17:50 -060037COBJS-$(CONFIG_USB_TTY) += circbuf.o
Thomas Choued6ce672011-01-11 09:38:20 +080038COBJS-y += crc7.o
Jean-Christophe PLAGNIOL-VILLARDbbf52df2008-08-29 01:18:11 +020039COBJS-y += crc16.o
Grant Likelyf0037c52007-09-24 09:05:30 -060040COBJS-y += display_options.o
Wolfgang Denk65cd3fa2010-06-12 00:19:46 +020041COBJS-y += errno.o
Simon Glassb5220bc2011-10-24 19:15:32 +000042COBJS-$(CONFIG_OF_CONTROL) += fdtdec.o
Simon Glassdc254f32012-01-17 08:20:51 +000043COBJS-$(CONFIG_TEST_FDTDEC) += fdtdec_test.o
Mike Frysinger44431ca2010-01-21 19:30:36 -050044COBJS-$(CONFIG_GZIP) += gunzip.o
Lei Wen88d52c62012-09-28 04:26:46 +000045COBJS-$(CONFIG_GZIP_COMPRESSED) += gzip.o
Wolfgang Denka6826fb2010-06-20 13:17:12 +020046COBJS-y += hashtable.o
Mike Frysingera16028d2009-11-03 11:35:59 -050047COBJS-$(CONFIG_LMB) += lmb.o
Grant Likelyf0037c52007-09-24 09:05:30 -060048COBJS-y += ldiv.o
Bartlomiej Sieka0ede0c32008-03-14 16:22:34 +010049COBJS-$(CONFIG_MD5) += md5.o
Dirk Behme6a45e382010-01-03 08:33:58 +010050COBJS-y += net_utils.o
Gabe Black40fef042012-12-02 04:55:18 +000051COBJS-$(CONFIG_PHYSMEM) += physmem.o
Wolfgang Denk54c69772010-06-13 01:45:10 +020052COBJS-y += qsort.o
Mike Frysingerdac4d7e2010-01-17 21:08:00 -050053COBJS-$(CONFIG_SHA1) += sha1.o
Jean-Christophe PLAGNIOL-VILLARDb571afd2008-06-07 12:29:52 +020054COBJS-$(CONFIG_SHA256) += sha256.o
Haavard Skinnemoen0768b7a2008-08-18 13:41:27 +020055COBJS-y += strmhz.o
Aneesh V05bad4a2011-07-13 05:11:06 +000056COBJS-$(CONFIG_RBTREE) += rbtree.o
57endif
58
Matt Porter24de3572012-01-31 12:03:57 +000059ifdef CONFIG_SPL_BUILD
60COBJS-$(CONFIG_SPL_YMODEM_SUPPORT) += crc16.o
Ilya Yanok7ac2fe22012-09-18 00:22:50 +000061COBJS-$(CONFIG_SPL_NET_SUPPORT) += crc32.o
62ifneq ($(CONFIG_SPL_SPI_FLASH_SUPPORT)$(CONFIG_SPL_NET_SUPPORT),)
63COBJS-y += display_options.o
64endif
65COBJS-$(CONFIG_SPL_NET_SUPPORT) += errno.o
66COBJS-$(CONFIG_SPL_NET_SUPPORT) += hashtable.o
67COBJS-$(CONFIG_SPL_NET_SUPPORT) += net_utils.o
Matt Porter24de3572012-01-31 12:03:57 +000068endif
Stefan Roeseaca587b2012-01-05 10:57:20 +010069COBJS-y += crc32.o
Aneesh V05bad4a2011-07-13 05:11:06 +000070COBJS-y += ctype.o
71COBJS-y += div64.o
Joe Hershbergere772cb32012-12-11 22:16:18 -060072COBJS-y += linux_string.o
Aneesh V05bad4a2011-07-13 05:11:06 +000073COBJS-y += string.o
Ingo van Lil3eb90ba2009-11-24 14:09:21 +010074COBJS-y += time.o
Jason Hobbse11938e2011-08-23 11:06:56 +000075COBJS-$(CONFIG_BOOTP_PXE) += uuid.o
Grant Likelyf0037c52007-09-24 09:05:30 -060076COBJS-y += vsprintf.o
Michael Walle9acf1ca2012-06-05 11:33:14 +000077COBJS-$(CONFIG_RANDOM_MACADDR) += rand.o
Michael Walle99e139d2012-06-05 11:33:15 +000078COBJS-$(CONFIG_BOOTP_RANDOM_DELAY) += rand.o
79COBJS-$(CONFIG_CMD_LINK_LOCAL) += rand.o
Wolfgang Denk511d0c72006-10-09 00:42:01 +020080
Michael Walle99e139d2012-06-05 11:33:15 +000081COBJS := $(sort $(COBJS-y))
Wolfgang Denk53677ef2008-05-20 16:00:29 +020082SRCS := $(COBJS:.o=.c)
Marian Balakowiczf9328632006-09-01 19:49:50 +020083OBJS := $(addprefix $(obj),$(COBJS))
wdenk87e33a62002-07-20 18:56:22 +000084
Marian Balakowiczf9328632006-09-01 19:49:50 +020085$(LIB): $(obj).depend $(OBJS)
Sebastien Carlier6d8962e2010-11-05 15:48:07 +010086 $(call cmd_link_o_target, $(OBJS))
wdenk87e33a62002-07-20 18:56:22 +000087
Albert ARIBAUDb823fd92012-10-09 09:28:15 +000088# SEE README.arm-unaligned-accesses
89$(obj)bzlib.o: CFLAGS += $(PLATFORM_NO_UNALIGNED)
90
wdenk87e33a62002-07-20 18:56:22 +000091#########################################################################
92
Marian Balakowiczf9328632006-09-01 19:49:50 +020093# defines $(obj).depend target
94include $(SRCTREE)/rules.mk
wdenk87e33a62002-07-20 18:56:22 +000095
Marian Balakowiczf9328632006-09-01 19:49:50 +020096sinclude $(obj).depend
wdenk87e33a62002-07-20 18:56:22 +000097
98#########################################################################