blob: df0cdd4252e838c3749267d130db568820effe56 [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#
Wolfgang Denk1a459662013-07-08 09:37:19 +02005# SPDX-License-Identifier: GPL-2.0+
wdenk87e33a62002-07-20 18:56:22 +00006#
7
8include $(TOPDIR)/config.mk
9
Sebastien Carlier6d8962e2010-11-05 15:48:07 +010010LIB = $(obj)libgeneric.o
wdenk87e33a62002-07-20 18:56:22 +000011
Aneesh V05bad4a2011-07-13 05:11:06 +000012ifndef CONFIG_SPL_BUILD
Yen Lin5b1a5452012-04-05 11:54:58 +000013COBJS-$(CONFIG_AES) += aes.o
Mike Frysingerab76e982009-02-05 21:04:50 -050014COBJS-$(CONFIG_BZIP2) += bzlib.o
15COBJS-$(CONFIG_BZIP2) += bzlib_crctable.o
16COBJS-$(CONFIG_BZIP2) += bzlib_decompress.o
17COBJS-$(CONFIG_BZIP2) += bzlib_randtable.o
18COBJS-$(CONFIG_BZIP2) += bzlib_huffman.o
Peter Tyser9ef78512009-11-09 15:17:50 -060019COBJS-$(CONFIG_USB_TTY) += circbuf.o
Thomas Choued6ce672011-01-11 09:38:20 +080020COBJS-y += crc7.o
Jean-Christophe PLAGNIOL-VILLARDbbf52df2008-08-29 01:18:11 +020021COBJS-y += crc16.o
Simon Glassb5220bc2011-10-24 19:15:32 +000022COBJS-$(CONFIG_OF_CONTROL) += fdtdec.o
Simon Glassdc254f32012-01-17 08:20:51 +000023COBJS-$(CONFIG_TEST_FDTDEC) += fdtdec_test.o
Mike Frysinger44431ca2010-01-21 19:30:36 -050024COBJS-$(CONFIG_GZIP) += gunzip.o
Lei Wen88d52c62012-09-28 04:26:46 +000025COBJS-$(CONFIG_GZIP_COMPRESSED) += gzip.o
Simon Glassc8a311d2013-03-05 14:39:40 +000026COBJS-y += initcall.o
Mike Frysingera16028d2009-11-03 11:35:59 -050027COBJS-$(CONFIG_LMB) += lmb.o
Grant Likelyf0037c52007-09-24 09:05:30 -060028COBJS-y += ldiv.o
Bartlomiej Sieka0ede0c32008-03-14 16:22:34 +010029COBJS-$(CONFIG_MD5) += md5.o
Dirk Behme6a45e382010-01-03 08:33:58 +010030COBJS-y += net_utils.o
Gabe Black40fef042012-12-02 04:55:18 +000031COBJS-$(CONFIG_PHYSMEM) += physmem.o
Wolfgang Denk54c69772010-06-13 01:45:10 +020032COBJS-y += qsort.o
Mike Frysingerdac4d7e2010-01-17 21:08:00 -050033COBJS-$(CONFIG_SHA1) += sha1.o
Jean-Christophe PLAGNIOL-VILLARDb571afd2008-06-07 12:29:52 +020034COBJS-$(CONFIG_SHA256) += sha256.o
Haavard Skinnemoen0768b7a2008-08-18 13:41:27 +020035COBJS-y += strmhz.o
Che-liang Chiou8732b072013-02-28 09:34:57 +000036COBJS-$(CONFIG_TPM) += tpm.o
Aneesh V05bad4a2011-07-13 05:11:06 +000037COBJS-$(CONFIG_RBTREE) += rbtree.o
Mike Dunn0dd9c7a92013-04-12 11:59:17 -070038COBJS-$(CONFIG_BITREVERSE) += bitrev.o
Aneesh V05bad4a2011-07-13 05:11:06 +000039endif
40
Matt Porter24de3572012-01-31 12:03:57 +000041ifdef CONFIG_SPL_BUILD
42COBJS-$(CONFIG_SPL_YMODEM_SUPPORT) += crc16.o
Ilya Yanok7ac2fe22012-09-18 00:22:50 +000043COBJS-$(CONFIG_SPL_NET_SUPPORT) += net_utils.o
Matt Porter24de3572012-01-31 12:03:57 +000044endif
Ying Zhangf90572d2013-05-20 14:07:26 +080045COBJS-$(CONFIG_ADDR_MAP) += addr_map.o
46COBJS-y += hashtable.o
47COBJS-y += errno.o
48COBJS-y += display_options.o
Andreas Bießmann4a093002013-04-05 04:55:21 +000049COBJS-$(CONFIG_BCH) += bch.o
Stefan Roeseaca587b2012-01-05 10:57:20 +010050COBJS-y += crc32.o
Aneesh V05bad4a2011-07-13 05:11:06 +000051COBJS-y += ctype.o
52COBJS-y += div64.o
Andreas Bießmannd2eae432013-04-18 22:48:50 +000053COBJS-y += hang.o
Joe Hershbergere772cb32012-12-11 22:16:18 -060054COBJS-y += linux_string.o
Wolfgang Denka5ecbe62013-03-23 23:50:31 +000055COBJS-$(CONFIG_REGEX) += slre.o
Aneesh V05bad4a2011-07-13 05:11:06 +000056COBJS-y += string.o
Ingo van Lil3eb90ba2009-11-24 14:09:21 +010057COBJS-y += time.o
Simon Glassb2e16a82013-06-11 11:14:39 -070058COBJS-$(CONFIG_TRACE) += trace.o
Jason Hobbse11938e2011-08-23 11:06:56 +000059COBJS-$(CONFIG_BOOTP_PXE) += uuid.o
Grant Likelyf0037c52007-09-24 09:05:30 -060060COBJS-y += vsprintf.o
Michael Walle9acf1ca2012-06-05 11:33:14 +000061COBJS-$(CONFIG_RANDOM_MACADDR) += rand.o
Michael Walle99e139d2012-06-05 11:33:15 +000062COBJS-$(CONFIG_BOOTP_RANDOM_DELAY) += rand.o
63COBJS-$(CONFIG_CMD_LINK_LOCAL) += rand.o
Wolfgang Denk511d0c72006-10-09 00:42:01 +020064
Michael Walle99e139d2012-06-05 11:33:15 +000065COBJS := $(sort $(COBJS-y))
Wolfgang Denk53677ef2008-05-20 16:00:29 +020066SRCS := $(COBJS:.o=.c)
Marian Balakowiczf9328632006-09-01 19:49:50 +020067OBJS := $(addprefix $(obj),$(COBJS))
wdenk87e33a62002-07-20 18:56:22 +000068
Marian Balakowiczf9328632006-09-01 19:49:50 +020069$(LIB): $(obj).depend $(OBJS)
Sebastien Carlier6d8962e2010-11-05 15:48:07 +010070 $(call cmd_link_o_target, $(OBJS))
wdenk87e33a62002-07-20 18:56:22 +000071
Albert ARIBAUDb823fd92012-10-09 09:28:15 +000072# SEE README.arm-unaligned-accesses
73$(obj)bzlib.o: CFLAGS += $(PLATFORM_NO_UNALIGNED)
74
wdenk87e33a62002-07-20 18:56:22 +000075#########################################################################
76
Marian Balakowiczf9328632006-09-01 19:49:50 +020077# defines $(obj).depend target
78include $(SRCTREE)/rules.mk
wdenk87e33a62002-07-20 18:56:22 +000079
Marian Balakowiczf9328632006-09-01 19:49:50 +020080sinclude $(obj).depend
wdenk87e33a62002-07-20 18:56:22 +000081
82#########################################################################