wdenk | e85390d | 2002-04-01 14:29:03 +0000 | [diff] [blame] | 1 | # |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 2 | # (C) Copyright 2000-2006 |
wdenk | e85390d | 2002-04-01 14:29:03 +0000 | [diff] [blame] | 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
| 4 | # |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame^] | 5 | # SPDX-License-Identifier: GPL-2.0+ |
wdenk | e85390d | 2002-04-01 14:29:03 +0000 | [diff] [blame] | 6 | # |
| 7 | |
| 8 | include $(TOPDIR)/config.mk |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 9 | ifneq ($(OBJTREE),$(SRCTREE)) |
Wolfgang Denk | 9209ed5 | 2011-11-01 20:54:02 +0000 | [diff] [blame] | 10 | $(shell mkdir -p $(obj)drivers/epic $(obj)drivers/i2c) |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 11 | endif |
wdenk | e85390d | 2002-04-01 14:29:03 +0000 | [diff] [blame] | 12 | |
Sebastien Carlier | a8d426f | 2010-11-05 15:48:07 +0100 | [diff] [blame] | 13 | LIB = $(obj)lib$(CPU).o |
wdenk | e85390d | 2002-04-01 14:29:03 +0000 | [diff] [blame] | 14 | |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 15 | START = start.o |
| 16 | COBJS = traps.o cpu.o cpu_init.o interrupts.o speed.o \ |
| 17 | drivers/epic/epic1.o drivers/i2c/i2c.o pci.o |
| 18 | COBJS_LN = bedbug_603e.o |
wdenk | e85390d | 2002-04-01 14:29:03 +0000 | [diff] [blame] | 19 | |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 20 | SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) $(addprefix $(obj),$(COBJS_LN:.o=.c)) |
| 21 | OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS) $(COBJS_LN)) |
| 22 | START := $(addprefix $(obj),$(START)) |
| 23 | |
| 24 | all: $(obj).depend $(START) $(LIB) |
wdenk | e85390d | 2002-04-01 14:29:03 +0000 | [diff] [blame] | 25 | |
| 26 | $(LIB): $(OBJS) |
Sebastien Carlier | a8d426f | 2010-11-05 15:48:07 +0100 | [diff] [blame] | 27 | $(call cmd_link_o_target, $(OBJS)) |
wdenk | e85390d | 2002-04-01 14:29:03 +0000 | [diff] [blame] | 28 | |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 29 | $(obj)bedbug_603e.c: |
Wolfgang Denk | 30bcf2c | 2009-01-14 22:35:30 +0100 | [diff] [blame] | 30 | ln -sf $(src)../mpc8260/bedbug_603e.c $(obj)bedbug_603e.c |
wdenk | 4a5c8a7 | 2003-03-06 00:02:04 +0000 | [diff] [blame] | 31 | |
wdenk | e85390d | 2002-04-01 14:29:03 +0000 | [diff] [blame] | 32 | ######################################################################### |
| 33 | |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 34 | # defines $(obj).depend target |
| 35 | include $(SRCTREE)/rules.mk |
wdenk | e85390d | 2002-04-01 14:29:03 +0000 | [diff] [blame] | 36 | |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 37 | sinclude $(obj).depend |
wdenk | e85390d | 2002-04-01 14:29:03 +0000 | [diff] [blame] | 38 | |
| 39 | ######################################################################### |