Makefile revision 11348
111348Sandreas.sandberg@arm.com# Copyright (c) 2015 ARM Limited
211348Sandreas.sandberg@arm.com# All rights reserved.
311348Sandreas.sandberg@arm.com#
411348Sandreas.sandberg@arm.com# Redistribution and use in source and binary forms, with or without
511348Sandreas.sandberg@arm.com# modification, are permitted provided that the following conditions are
611348Sandreas.sandberg@arm.com# met: redistributions of source code must retain the above copyright
711348Sandreas.sandberg@arm.com# notice, this list of conditions and the following disclaimer;
811348Sandreas.sandberg@arm.com# redistributions in binary form must reproduce the above copyright
911348Sandreas.sandberg@arm.com# notice, this list of conditions and the following disclaimer in the
1011348Sandreas.sandberg@arm.com# documentation and/or other materials provided with the distribution;
1111348Sandreas.sandberg@arm.com# neither the name of the copyright holders nor the names of its
1211348Sandreas.sandberg@arm.com# contributors may be used to endorse or promote products derived from
1311348Sandreas.sandberg@arm.com# this software without specific prior written permission.
1411348Sandreas.sandberg@arm.com#
1511348Sandreas.sandberg@arm.com# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1611348Sandreas.sandberg@arm.com# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1711348Sandreas.sandberg@arm.com# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1811348Sandreas.sandberg@arm.com# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1911348Sandreas.sandberg@arm.com# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2011348Sandreas.sandberg@arm.com# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2111348Sandreas.sandberg@arm.com# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2211348Sandreas.sandberg@arm.com# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2311348Sandreas.sandberg@arm.com# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2411348Sandreas.sandberg@arm.com# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2511348Sandreas.sandberg@arm.com# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2611348Sandreas.sandberg@arm.com#
2711348Sandreas.sandberg@arm.com# Authors: Andreas Sandberg
2811348Sandreas.sandberg@arm.com
2911348Sandreas.sandberg@arm.comCPP?=cpp
3011348Sandreas.sandberg@arm.comDTC?=dtc
3111348Sandreas.sandberg@arm.com
3211348Sandreas.sandberg@arm.comDTC_CPP_FLAGS=-nostdinc -undef
3311348Sandreas.sandberg@arm.com
3411348Sandreas.sandberg@arm.comTARGETS=\
3511348Sandreas.sandberg@arm.com	armv7_gem5_v1_1cpu.dtb armv7_gem5_v1_2cpu.dtb \
3611348Sandreas.sandberg@arm.com	armv7_gem5_v1_4cpu.dtb armv7_gem5_v1_8cpu.dtb \
3711348Sandreas.sandberg@arm.com	armv7_gem5_v1_16cpu.dtb \
3811348Sandreas.sandberg@arm.com	armv8_gem5_v1_1cpu.dtb armv8_gem5_v1_2cpu.dtb \
3911348Sandreas.sandberg@arm.com	armv8_gem5_v1_4cpu.dtb armv8_gem5_v1_8cpu.dtb \
4011348Sandreas.sandberg@arm.com	armv8_gem5_v1_16cpu.dtb
4111348Sandreas.sandberg@arm.com
4211348Sandreas.sandberg@arm.comGEN_DTS=mkdir -p .gen; \
4311348Sandreas.sandberg@arm.com	$(CPP) -x assembler-with-cpp \
4411348Sandreas.sandberg@arm.com		$(DTC_CPP_FLAGS) \
4511348Sandreas.sandberg@arm.com		-DCONF_PLATFORM=\"platforms/$(1)\" \
4611348Sandreas.sandberg@arm.com		-DCONF_CPUS=$(2) \
4711348Sandreas.sandberg@arm.com		-o $@ $<
4811348Sandreas.sandberg@arm.com
4911348Sandreas.sandberg@arm.comall: $(TARGETS)
5011348Sandreas.sandberg@arm.com
5111348Sandreas.sandberg@arm.com.gen/armv7_gem5_v1_%cpu.dts: armv7.dts platforms/vexpress_gem5_v1.dtsi
5211348Sandreas.sandberg@arm.com	$(call GEN_DTS,vexpress_gem5_v1.dtsi,$*)
5311348Sandreas.sandberg@arm.com
5411348Sandreas.sandberg@arm.com.gen/armv8_gem5_v1_%cpu.dts: armv8.dts platforms/vexpress_gem5_v1.dtsi
5511348Sandreas.sandberg@arm.com	$(call GEN_DTS,vexpress_gem5_v1.dtsi,$*)
5611348Sandreas.sandberg@arm.com
5711348Sandreas.sandberg@arm.com%.dtb: .gen/%.dts
5811348Sandreas.sandberg@arm.com	$(DTC) -I dts -O dtb -o $@ $<
5911348Sandreas.sandberg@arm.com
6011348Sandreas.sandberg@arm.com
6111348Sandreas.sandberg@arm.comclean:
6211348Sandreas.sandberg@arm.com	$(RM) -r .gen
6311348Sandreas.sandberg@arm.com	$(RM) *.dtb
64