Stefan Roese | 5ff4c3f | 2005-08-15 12:31:23 +0200 | [diff] [blame] | 1 | # |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 2 | # (C) Copyright 2006 |
| 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
| 4 | # |
Stefan Roese | 5ff4c3f | 2005-08-15 12:31:23 +0200 | [diff] [blame] | 5 | # (C) Copyright 2005 |
| 6 | # Sandburst Corporation |
| 7 | # Travis B. Sawyer |
| 8 | # |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame^] | 9 | # SPDX-License-Identifier: GPL-2.0+ |
Stefan Roese | 5ff4c3f | 2005-08-15 12:31:23 +0200 | [diff] [blame] | 10 | # |
| 11 | |
| 12 | include $(TOPDIR)/config.mk |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 13 | ifneq ($(OBJTREE),$(SRCTREE)) |
| 14 | $(shell mkdir -p $(obj)../common) |
| 15 | endif |
Stefan Roese | 5ff4c3f | 2005-08-15 12:31:23 +0200 | [diff] [blame] | 16 | |
| 17 | # TBS: add for debugging purposes |
| 18 | BUILDUSER := $(shell whoami) |
| 19 | FORCEBUILD := $(shell rm -f $(LIB) $(BOARD).o) |
| 20 | |
| 21 | CFLAGS += -DBUILDUSER='"$(BUILDUSER)"' |
| 22 | # TBS: end debugging |
| 23 | |
| 24 | |
Sebastien Carlier | a8d426f | 2010-11-05 15:48:07 +0100 | [diff] [blame] | 25 | LIB = $(obj)lib$(BOARD).o |
Stefan Roese | 5ff4c3f | 2005-08-15 12:31:23 +0200 | [diff] [blame] | 26 | |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 27 | COBJS = $(BOARD).o ../common/flash.o ../common/ppc440gx_i2c.o \ |
Stefan Roese | 5ff4c3f | 2005-08-15 12:31:23 +0200 | [diff] [blame] | 28 | ../common/sb_common.o |
| 29 | |
| 30 | SOBJS = init.o |
| 31 | |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 32 | SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) |
| 33 | OBJS := $(addprefix $(obj),$(COBJS)) |
| 34 | SOBJS := $(addprefix $(obj),$(SOBJS)) |
Stefan Roese | 5ff4c3f | 2005-08-15 12:31:23 +0200 | [diff] [blame] | 35 | |
| 36 | $(LIB): $(OBJS) $(SOBJS) |
Sebastien Carlier | a8d426f | 2010-11-05 15:48:07 +0100 | [diff] [blame] | 37 | $(call cmd_link_o_target, $(OBJS)) |
Stefan Roese | 5ff4c3f | 2005-08-15 12:31:23 +0200 | [diff] [blame] | 38 | |
Stefan Roese | 5ff4c3f | 2005-08-15 12:31:23 +0200 | [diff] [blame] | 39 | ######################################################################### |
| 40 | |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 41 | # defines $(obj).depend target |
| 42 | include $(SRCTREE)/rules.mk |
Stefan Roese | 5ff4c3f | 2005-08-15 12:31:23 +0200 | [diff] [blame] | 43 | |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 44 | sinclude $(obj).depend |
Stefan Roese | 5ff4c3f | 2005-08-15 12:31:23 +0200 | [diff] [blame] | 45 | |
| 46 | ######################################################################### |