Makefile revision 13510
111569Sgabor.dozsa@arm.com# Copyright (c) 2015-2016 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=\
3513510Sjairo.balart@metempsy.com	armv7_gem5_v1_1cpu.dtb \
3613510Sjairo.balart@metempsy.com	armv7_gem5_v1_2cpu.dtb \
3713510Sjairo.balart@metempsy.com	armv7_gem5_v1_4cpu.dtb \
3813510Sjairo.balart@metempsy.com	armv7_gem5_v1_8cpu.dtb \
3911348Sandreas.sandberg@arm.com	armv7_gem5_v1_16cpu.dtb \
4013510Sjairo.balart@metempsy.com	armv8_gem5_v1_1cpu.dtb \
4113510Sjairo.balart@metempsy.com	armv8_gem5_v1_2cpu.dtb \
4213510Sjairo.balart@metempsy.com	armv8_gem5_v1_4cpu.dtb \
4313510Sjairo.balart@metempsy.com	armv8_gem5_v1_8cpu.dtb \
4411569Sgabor.dozsa@arm.com	armv8_gem5_v1_16cpu.dtb \
4511569Sgabor.dozsa@arm.com	armv8_gem5_v1_big_little_2_2.dtb \
4613510Sjairo.balart@metempsy.com	armv8_gem5_v1_big_little_2_4.dtb \
4713510Sjairo.balart@metempsy.com	armv8_gem5_v2_1cpu.dtb \
4813510Sjairo.balart@metempsy.com	armv8_gem5_v2_2cpu.dtb \
4913510Sjairo.balart@metempsy.com	armv8_gem5_v2_4cpu.dtb \
5013510Sjairo.balart@metempsy.com	armv8_gem5_v2_8cpu.dtb \
5113510Sjairo.balart@metempsy.com	armv8_gem5_v2_16cpu.dtb
5211348Sandreas.sandberg@arm.com
5311348Sandreas.sandberg@arm.comGEN_DTS=mkdir -p .gen; \
5411348Sandreas.sandberg@arm.com	$(CPP) -x assembler-with-cpp \
5511348Sandreas.sandberg@arm.com		$(DTC_CPP_FLAGS) \
5611348Sandreas.sandberg@arm.com		-DCONF_PLATFORM=\"platforms/$(1)\" \
5711348Sandreas.sandberg@arm.com		-DCONF_CPUS=$(2) \
5811348Sandreas.sandberg@arm.com		-o $@ $<
5911348Sandreas.sandberg@arm.com
6011348Sandreas.sandberg@arm.comall: $(TARGETS)
6111348Sandreas.sandberg@arm.com
6212761Sandreas.sandberg@arm.complatforms/vexpress_gem5_v1.dtsi: platforms/vexpress_gem5_v1_base.dtsi
6312761Sandreas.sandberg@arm.com
6413510Sjairo.balart@metempsy.complatforms/vexpress_gem5_v2.dtsi: platforms/vexpress_gem5_v2_base.dtsi
6513510Sjairo.balart@metempsy.com
6611348Sandreas.sandberg@arm.com.gen/armv7_gem5_v1_%cpu.dts: armv7.dts platforms/vexpress_gem5_v1.dtsi
6711348Sandreas.sandberg@arm.com	$(call GEN_DTS,vexpress_gem5_v1.dtsi,$*)
6811348Sandreas.sandberg@arm.com
6911348Sandreas.sandberg@arm.com.gen/armv8_gem5_v1_%cpu.dts: armv8.dts platforms/vexpress_gem5_v1.dtsi
7011348Sandreas.sandberg@arm.com	$(call GEN_DTS,vexpress_gem5_v1.dtsi,$*)
7111348Sandreas.sandberg@arm.com
7213510Sjairo.balart@metempsy.com.gen/armv8_gem5_v2_%cpu.dts: armv8.dts platforms/vexpress_gem5_v2.dtsi
7313510Sjairo.balart@metempsy.com	$(call GEN_DTS,vexpress_gem5_v2.dtsi,$*)
7413510Sjairo.balart@metempsy.com
7511569Sgabor.dozsa@arm.com.gen/armv8_gem5_v1_big_little%.dts: armv8_big_little.dts \
7611569Sgabor.dozsa@arm.com	platforms/vexpress_gem5_v1.dtsi
7711569Sgabor.dozsa@arm.com	$(call GEN_DTS,vexpress_gem5_v1.dtsi,$*)
7811569Sgabor.dozsa@arm.com
7911348Sandreas.sandberg@arm.com%.dtb: .gen/%.dts
8011348Sandreas.sandberg@arm.com	$(DTC) -I dts -O dtb -o $@ $<
8111348Sandreas.sandberg@arm.com
8211348Sandreas.sandberg@arm.com
8311348Sandreas.sandberg@arm.comclean:
8411348Sandreas.sandberg@arm.com	$(RM) -r .gen
8511348Sandreas.sandberg@arm.com	$(RM) *.dtb
86