2008-04-04 16:16:06 +00:00
|
|
|
#
|
|
|
|
# (C) Copyright 2007 Carsten Schlote <schlote@vahanus.net>
|
|
|
|
# See file CREDITS for list of people who contributed to this project.
|
|
|
|
#
|
2009-12-15 08:11:09 +00:00
|
|
|
# This file is part of barebox.
|
2008-04-04 16:16:06 +00:00
|
|
|
#
|
2009-12-15 08:11:09 +00:00
|
|
|
# barebox is free software: you can redistribute it and/or modify
|
2008-04-04 16:16:06 +00:00
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
2009-12-15 08:11:09 +00:00
|
|
|
# barebox is distributed in the hope that it will be useful,
|
2008-04-04 16:16:06 +00:00
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
2009-12-15 08:11:09 +00:00
|
|
|
# along with barebox. If not, see <http://www.gnu.org/licenses/>.
|
2008-04-04 16:16:06 +00:00
|
|
|
#
|
|
|
|
|
2008-06-03 10:54:37 +00:00
|
|
|
CPPFLAGS += -isystem $(gccincdir) -D __M68K__ \
|
2008-04-04 16:16:06 +00:00
|
|
|
-fno-strict-aliasing
|
|
|
|
|
|
|
|
|
|
|
|
machine-$(CONFIG_ARCH_MCF54xx) := mcfv4e
|
|
|
|
board-$(CONFIG_MACH_KPUKDR1) := kp_ukd_r1
|
|
|
|
board-$(CONFIG_MACH_KPUKDR1_NUM) := kp_ukd_r1_num
|
|
|
|
board-$(CONFIG_MACH_KPUKDR2) := kp_ukd_r2
|
|
|
|
board-$(CONFIG_MACH_KPUKDR2_NUM) := kp_ukd_r2_num
|
|
|
|
board-$(CONFIG_MACH_PCM982_5485) := phycore_mcf54xx
|
|
|
|
board-$(CONFIG_MACH_PCM982_5475) := phycore_mcf54xx
|
|
|
|
board-$(CONFIG_MACH_PCM982_5475_NUM) := phycore_mcf54xx_num
|
|
|
|
board-$(CONFIG_MACH_PCM982_54455) := phycore_mcf5445x
|
|
|
|
|
|
|
|
cpu-$(CONFIG_MCFV4E) := mcfv4e
|
|
|
|
cpu-$(CONFIG_MCFV4M) := mcfv4m
|
|
|
|
|
|
|
|
TEXT_BASE = $(CONFIG_TEXT_BASE)
|
|
|
|
|
|
|
|
CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE) -P
|
|
|
|
AFLAGS += -gdwarf-2 -save-temps
|
|
|
|
# FIXME - remove overide
|
2008-06-03 10:24:50 +00:00
|
|
|
CFLAGS += -msoft-float -mcfv4e -gdwarf-2 -feliminate-unused-debug-types \
|
2008-06-03 10:26:51 +00:00
|
|
|
-fmerge-all-constants
|
2009-12-15 08:11:09 +00:00
|
|
|
# Incompatible code in barebox for -std=c99
|
|
|
|
LDFLAGS_barebox :=-L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc
|
2008-04-04 16:16:06 +00:00
|
|
|
# --verbose --stats
|
|
|
|
|
2009-10-22 12:23:26 +00:00
|
|
|
machdirs := $(patsubst %,arch/m68k/mach-%/,$(machine-y))
|
2008-04-04 16:16:06 +00:00
|
|
|
|
2009-10-22 12:23:26 +00:00
|
|
|
ifeq ($(KBUILD_SRC),)
|
|
|
|
CPPFLAGS += $(patsubst %,-I%include,$(machdirs))
|
2008-04-04 16:16:06 +00:00
|
|
|
else
|
2009-10-22 12:23:26 +00:00
|
|
|
CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs))
|
2008-04-04 16:16:06 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
all: $(KBUILD_IMAGE)
|
|
|
|
|
|
|
|
archprepare: maketools
|
|
|
|
|
|
|
|
PHONY += maketools
|
|
|
|
|
|
|
|
|
|
|
|
ifneq ($(board-y),)
|
2010-07-22 03:00:13 +00:00
|
|
|
BOARD := arch/m68k/boards/$(board-y)/
|
2008-04-04 16:16:06 +00:00
|
|
|
else
|
|
|
|
BOARD :=
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(machine-y),)
|
|
|
|
MACH := arch/m68k/mach-$(machine-y)/
|
|
|
|
else
|
|
|
|
MACH :=
|
|
|
|
endif
|
|
|
|
|
|
|
|
common-y += $(BOARD) $(MACH)
|
|
|
|
common-y += arch/m68k/lib/ arch/m68k/cpu/
|
|
|
|
|
2009-12-15 08:11:09 +00:00
|
|
|
lds-$(CONFIG_GENERIC_LINKER_SCRIPT) := arch/m68k/lib/barebox.lds
|
|
|
|
lds-$(CONFIG_BOARD_LINKER_SCRIPT) := $(BOARD)/barebox.lds
|
2008-04-04 16:16:06 +00:00
|
|
|
|
2009-12-15 08:11:09 +00:00
|
|
|
CLEAN_FILES += arch/m68k/lib/barebox.lds
|