blob: 9e6461ace1956d1b44bcd1fa607ddd157cbb0f24 [file] [log] [blame]
wdenk012771d2002-03-08 21:31:05 +00001#
Marian Balakowiczf9328632006-09-01 19:49:50 +02002# (C) Copyright 2000-2006
wdenk012771d2002-03-08 21:31:05 +00003# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4#
Wolfgang Denk1a459662013-07-08 09:37:19 +02005# SPDX-License-Identifier: GPL-2.0+
wdenk012771d2002-03-08 21:31:05 +00006#
7
8include $(TOPDIR)/config.mk
9
Sebastien Carlier6d8962e2010-11-05 15:48:07 +010010LIB = $(obj)lib$(BOARD).o
wdenk012771d2002-03-08 21:31:05 +000011
Marian Balakowiczf9328632006-09-01 19:49:50 +020012COBJS = $(BOARD).o flash.o
wdenk8bde7f72003-06-27 21:31:46 +000013SOBJS = init.o
wdenk012771d2002-03-08 21:31:05 +000014
Marian Balakowiczf9328632006-09-01 19:49:50 +020015
16SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
17OBJS := $(addprefix $(obj),$(COBJS))
18SOBJS := $(addprefix $(obj),$(SOBJS))
19
wdenk5d232d02003-05-22 22:52:13 +000020# HACK: depend needs bootscript.c, which needs tools/mkimage, which is not
21# built in the depend stage. So... put bootscript.o here, not in OBJS
Marian Balakowiczf9328632006-09-01 19:49:50 +020022$(LIB): $(OBJS) $(SOBJS) $(obj)bootscript.o
Sebastien Carlier6d8962e2010-11-05 15:48:07 +010023 $(call cmd_link_o_target, $^)
wdenk012771d2002-03-08 21:31:05 +000024
Marian Balakowiczf9328632006-09-01 19:49:50 +020025$(obj)$(BOARD).o : $(src)$(BOARD).c $(obj)bootscript.o
wdenk7f70e852003-05-20 14:25:27 +000026
Marian Balakowiczf9328632006-09-01 19:49:50 +020027$(obj)bootscript.c: $(obj)bootscript.image
wdenk7f70e852003-05-20 14:25:27 +000028 od -t x1 -v -A x $^ | awk -f x2c.awk > $@
29
Marian Balakowiczf9328632006-09-01 19:49:50 +020030$(obj)bootscript.image: $(src)bootscript.hush $(src)Makefile
31 -$(OBJTREE)/tools/mkimage -A ppc -O linux -T script -C none -a 0 -e 0 -n bootscript -d $(src)bootscript.hush $@
wdenk7f70e852003-05-20 14:25:27 +000032
wdenk012771d2002-03-08 21:31:05 +000033#########################################################################
34
Marian Balakowiczf9328632006-09-01 19:49:50 +020035# defines $(obj).depend target
36include $(SRCTREE)/rules.mk
wdenk012771d2002-03-08 21:31:05 +000037
Marian Balakowiczf9328632006-09-01 19:49:50 +020038sinclude $(obj).depend
wdenk012771d2002-03-08 21:31:05 +000039
40#########################################################################