wdenk | 7a428cc | 2003-06-15 22:40:42 +0000 | [diff] [blame] | 1 | # |
2 | # | ||||
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 3 | # SPDX-License-Identifier: GPL-2.0+ |
wdenk | 7a428cc | 2003-06-15 22:40:42 +0000 | [diff] [blame] | 4 | # |
5 | |||||
wdenk | 7a428cc | 2003-06-15 22:40:42 +0000 | [diff] [blame] | 6 | include $(TOPDIR)/config.mk |
7 | |||||
Sebastien Carlier | a8d426f | 2010-11-05 15:48:07 +0100 | [diff] [blame] | 8 | LIB = $(obj)libfat.o |
wdenk | 7a428cc | 2003-06-15 22:40:42 +0000 | [diff] [blame] | 9 | |
10 | AOBJS = | ||||
Stephen Warren | 4f8662d | 2012-10-22 06:43:50 +0000 | [diff] [blame] | 11 | COBJS-$(CONFIG_FS_FAT) := fat.o |
Donggeun Kim | 8f81400 | 2011-10-24 21:15:28 +0000 | [diff] [blame] | 12 | COBJS-$(CONFIG_FAT_WRITE):= fat_write.o |
Aneesh V | 55fc5b6 | 2011-07-13 05:11:06 +0000 | [diff] [blame] | 13 | |
14 | ifndef CONFIG_SPL_BUILD | ||||
Stephen Warren | 4f8662d | 2012-10-22 06:43:50 +0000 | [diff] [blame] | 15 | COBJS-$(CONFIG_FS_FAT) += file.o |
Aneesh V | 55fc5b6 | 2011-07-13 05:11:06 +0000 | [diff] [blame] | 16 | endif |
wdenk | 7a428cc | 2003-06-15 22:40:42 +0000 | [diff] [blame] | 17 | |
Jean-Christophe PLAGNIOL-VILLARD | 39b9fc9 | 2008-08-31 04:24:56 +0200 | [diff] [blame] | 18 | SRCS := $(AOBJS:.o=.S) $(COBJS-y:.o=.c) |
19 | OBJS := $(addprefix $(obj),$(AOBJS) $(COBJS-y)) | ||||
wdenk | 7a428cc | 2003-06-15 22:40:42 +0000 | [diff] [blame] | 20 | |
21 | all: $(LIB) $(AOBJS) | ||||
22 | |||||
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 23 | $(LIB): $(obj).depend $(OBJS) |
Sebastien Carlier | a8d426f | 2010-11-05 15:48:07 +0100 | [diff] [blame] | 24 | $(call cmd_link_o_target, $(OBJS)) |
wdenk | 7a428cc | 2003-06-15 22:40:42 +0000 | [diff] [blame] | 25 | |
Albert ARIBAUD | d6d4ec8 | 2012-10-09 09:28:15 +0000 | [diff] [blame] | 26 | # SEE README.arm-unaligned-accesses |
27 | $(obj)file.o: CFLAGS += $(PLATFORM_NO_UNALIGNED) | ||||
wdenk | 7a428cc | 2003-06-15 22:40:42 +0000 | [diff] [blame] | 28 | |
29 | ######################################################################### | ||||
30 | |||||
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 31 | # defines $(obj).depend target |
32 | include $(SRCTREE)/rules.mk | ||||
wdenk | 7a428cc | 2003-06-15 22:40:42 +0000 | [diff] [blame] | 33 | |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 34 | sinclude $(obj).depend |
wdenk | 7a428cc | 2003-06-15 22:40:42 +0000 | [diff] [blame] | 35 | |
36 | ######################################################################### |