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