blob: 5d586098dd5e850d7a7060d2c61119b42e2ec08e [file] [log] [blame]
wdenk87e33a62002-07-20 18:56:22 +00001#
Marian Balakowiczd62379d2006-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 Carliera8d426f2010-11-05 15:48:07 +010026LIB = $(obj)libgeneric.o
wdenk87e33a62002-07-20 18:56:22 +000027
Aneesh V55fc5b62011-07-13 05:11:06 +000028ifndef CONFIG_SPL_BUILD
Kumar Gala0949bd12008-12-13 17:20:28 -060029COBJS-$(CONFIG_ADDR_MAP) += addr_map.o
Yen Lin2f879032012-04-05 11:54:58 +000030COBJS-$(CONFIG_AES) += aes.o
Mike Frysinger7c1555f2009-02-05 21:04:50 -050031COBJS-$(CONFIG_BZIP2) += bzlib.o
32COBJS-$(CONFIG_BZIP2) += bzlib_crctable.o
33COBJS-$(CONFIG_BZIP2) += bzlib_decompress.o
34COBJS-$(CONFIG_BZIP2) += bzlib_randtable.o
35COBJS-$(CONFIG_BZIP2) += bzlib_huffman.o
Peter Tysere8b39e42009-11-09 15:17:50 -060036COBJS-$(CONFIG_USB_TTY) += circbuf.o
Thomas Chou4f3391b2011-01-11 09:38:20 +080037COBJS-y += crc7.o
Jean-Christophe PLAGNIOL-VILLARD9ec67ee2008-08-29 01:18:11 +020038COBJS-y += crc16.o
Grant Likely1179ad12007-09-24 09:05:30 -060039COBJS-y += display_options.o
Wolfgang Denk74aedc12010-06-12 00:19:46 +020040COBJS-y += errno.o
Simon Glass2d2af852011-10-24 19:15:32 +000041COBJS-$(CONFIG_OF_CONTROL) += fdtdec.o
Simon Glass88941952012-01-17 08:20:51 +000042COBJS-$(CONFIG_TEST_FDTDEC) += fdtdec_test.o
Mike Frysingerab427ae2010-01-21 19:30:36 -050043COBJS-$(CONFIG_GZIP) += gunzip.o
Lei Wen7592d1b2012-09-28 04:26:46 +000044COBJS-$(CONFIG_GZIP_COMPRESSED) += gzip.o
Wolfgang Denkc9ae9862010-06-20 13:17:12 +020045COBJS-y += hashtable.o
Simon Glass82a5fa02013-03-05 14:39:40 +000046COBJS-y += initcall.o
Mike Frysingera0dadf82009-11-03 11:35:59 -050047COBJS-$(CONFIG_LMB) += lmb.o
Grant Likely1179ad12007-09-24 09:05:30 -060048COBJS-y += ldiv.o
Bartlomiej Siekab0ce3522008-03-14 16:22:34 +010049COBJS-$(CONFIG_MD5) += md5.o
Dirk Behme8b3cc062010-01-03 08:33:58 +010050COBJS-y += net_utils.o
Gabe Blacka2f3a932012-12-02 04:55:18 +000051COBJS-$(CONFIG_PHYSMEM) += physmem.o
Wolfgang Denk90699222010-06-13 01:45:10 +020052COBJS-y += qsort.o
Mike Frysinger9a849802010-01-17 21:08:00 -050053COBJS-$(CONFIG_SHA1) += sha1.o
Jean-Christophe PLAGNIOL-VILLARDc58a6b82008-06-07 12:29:52 +020054COBJS-$(CONFIG_SHA256) += sha256.o
Haavard Skinnemoenb644d6b2008-08-18 13:41:27 +020055COBJS-y += strmhz.o
Che-liang Chiouc18f9012013-02-28 09:34:57 +000056COBJS-$(CONFIG_TPM) += tpm.o
Aneesh V55fc5b62011-07-13 05:11:06 +000057COBJS-$(CONFIG_RBTREE) += rbtree.o
Mike Dunnf7eb8c72013-04-12 11:59:17 -070058COBJS-$(CONFIG_BITREVERSE) += bitrev.o
Aneesh V55fc5b62011-07-13 05:11:06 +000059endif
60
Matt Porter79bfa732012-01-31 12:03:57 +000061ifdef CONFIG_SPL_BUILD
62COBJS-$(CONFIG_SPL_YMODEM_SUPPORT) += crc16.o
Ilya Yanokf7a2c552012-09-18 00:22:50 +000063COBJS-$(CONFIG_SPL_NET_SUPPORT) += crc32.o
64ifneq ($(CONFIG_SPL_SPI_FLASH_SUPPORT)$(CONFIG_SPL_NET_SUPPORT),)
65COBJS-y += display_options.o
66endif
67COBJS-$(CONFIG_SPL_NET_SUPPORT) += errno.o
68COBJS-$(CONFIG_SPL_NET_SUPPORT) += hashtable.o
69COBJS-$(CONFIG_SPL_NET_SUPPORT) += net_utils.o
Matt Porter79bfa732012-01-31 12:03:57 +000070endif
Andreas Bießmann82a65472013-04-05 04:55:21 +000071COBJS-$(CONFIG_BCH) += bch.o
Stefan Roesea64a5b52012-01-05 10:57:20 +010072COBJS-y += crc32.o
Aneesh V55fc5b62011-07-13 05:11:06 +000073COBJS-y += ctype.o
74COBJS-y += div64.o
Andreas Bießmannd7a886b2013-04-18 22:48:50 +000075COBJS-y += hang.o
Joe Hershberger32ec63c2012-12-11 22:16:18 -060076COBJS-y += linux_string.o
Wolfgang Denk2aceea12013-03-23 23:50:31 +000077COBJS-$(CONFIG_REGEX) += slre.o
Aneesh V55fc5b62011-07-13 05:11:06 +000078COBJS-y += string.o
Ingo van Lilf0f778a2009-11-24 14:09:21 +010079COBJS-y += time.o
Jason Hobbs6e39cce2011-08-23 11:06:56 +000080COBJS-$(CONFIG_BOOTP_PXE) += uuid.o
Grant Likely1179ad12007-09-24 09:05:30 -060081COBJS-y += vsprintf.o
Michael Walled96bd012012-06-05 11:33:14 +000082COBJS-$(CONFIG_RANDOM_MACADDR) += rand.o
Michael Walleb90b97a2012-06-05 11:33:15 +000083COBJS-$(CONFIG_BOOTP_RANDOM_DELAY) += rand.o
84COBJS-$(CONFIG_CMD_LINK_LOCAL) += rand.o
Wolfgang Denk4df0da52006-10-09 00:42:01 +020085
Michael Walleb90b97a2012-06-05 11:33:15 +000086COBJS := $(sort $(COBJS-y))
Wolfgang Denka1be4762008-05-20 16:00:29 +020087SRCS := $(COBJS:.o=.c)
Marian Balakowiczd62379d2006-09-01 19:49:50 +020088OBJS := $(addprefix $(obj),$(COBJS))
wdenk87e33a62002-07-20 18:56:22 +000089
Marian Balakowiczd62379d2006-09-01 19:49:50 +020090$(LIB): $(obj).depend $(OBJS)
Sebastien Carliera8d426f2010-11-05 15:48:07 +010091 $(call cmd_link_o_target, $(OBJS))
wdenk87e33a62002-07-20 18:56:22 +000092
Albert ARIBAUDd6d4ec82012-10-09 09:28:15 +000093# SEE README.arm-unaligned-accesses
94$(obj)bzlib.o: CFLAGS += $(PLATFORM_NO_UNALIGNED)
95
wdenk87e33a62002-07-20 18:56:22 +000096#########################################################################
97
Marian Balakowiczd62379d2006-09-01 19:49:50 +020098# defines $(obj).depend target
99include $(SRCTREE)/rules.mk
wdenk87e33a62002-07-20 18:56:22 +0000100
Marian Balakowiczd62379d2006-09-01 19:49:50 +0200101sinclude $(obj).depend
wdenk87e33a62002-07-20 18:56:22 +0000102
103#########################################################################