Makefile revision 14146:0a60d7947b51
14202Sbinkertn@umich.edu# Copyright (c) 2015-2016 ARM Limited 24202Sbinkertn@umich.edu# All rights reserved. 34202Sbinkertn@umich.edu# 44202Sbinkertn@umich.edu# Redistribution and use in source and binary forms, with or without 54202Sbinkertn@umich.edu# modification, are permitted provided that the following conditions are 64202Sbinkertn@umich.edu# met: redistributions of source code must retain the above copyright 74202Sbinkertn@umich.edu# notice, this list of conditions and the following disclaimer; 84202Sbinkertn@umich.edu# redistributions in binary form must reproduce the above copyright 94202Sbinkertn@umich.edu# notice, this list of conditions and the following disclaimer in the 104202Sbinkertn@umich.edu# documentation and/or other materials provided with the distribution; 114202Sbinkertn@umich.edu# neither the name of the copyright holders nor the names of its 124202Sbinkertn@umich.edu# contributors may be used to endorse or promote products derived from 134202Sbinkertn@umich.edu# this software without specific prior written permission. 144202Sbinkertn@umich.edu# 154202Sbinkertn@umich.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 164202Sbinkertn@umich.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 174202Sbinkertn@umich.edu# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 184202Sbinkertn@umich.edu# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 194202Sbinkertn@umich.edu# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 204202Sbinkertn@umich.edu# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 214202Sbinkertn@umich.edu# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 224202Sbinkertn@umich.edu# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 234202Sbinkertn@umich.edu# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 244202Sbinkertn@umich.edu# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 254202Sbinkertn@umich.edu# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 264202Sbinkertn@umich.edu# 274202Sbinkertn@umich.edu# Authors: Andreas Sandberg 284202Sbinkertn@umich.edu 294202Sbinkertn@umich.eduCPP?=cpp 304202Sbinkertn@umich.eduDTC?=dtc 314202Sbinkertn@umich.edu 324202Sbinkertn@umich.eduDTC_CPP_FLAGS=-nostdinc -undef 335952Ssaidi@eecs.umich.edu 345952Ssaidi@eecs.umich.edu# $(1) is the prefix of DTB files 355952Ssaidi@eecs.umich.eduNUM_CPUS := 1 2 4 8 16 3612230Sgiacomo.travaglini@arm.comCREATE_TARGET=$(foreach n, $(NUM_CPUS), $(1)_$(n)cpu.dtb) 375548Snate@binkert.org 3812226Sgiacomo.travaglini@arm.comTARGET_PREFIX=\ 394202Sbinkertn@umich.edu armv7_gem5_v1 \ 4012230Sgiacomo.travaglini@arm.com armv8_gem5_v1 \ 4112230Sgiacomo.travaglini@arm.com armv8_gem5_v2 427067Snate@binkert.org 4312376Sgabeblack@google.comTARGETS=\ 445882Snate@binkert.org $(foreach prefix, $(TARGET_PREFIX), $(call CREATE_TARGET, $(prefix))) \ 454550Sbinkertn@umich.edu armv8_gem5_v1_big_little_2_2.dtb \ 464550Sbinkertn@umich.edu armv8_gem5_v1_big_little_2_4.dtb 4712230Sgiacomo.travaglini@arm.com 4812230Sgiacomo.travaglini@arm.comVEXPRESS_GEM5_V1_DTSIS=\ 4910839Sandreas.sandberg@arm.com platforms/vexpress_gem5_v1.dtsi \ 504202Sbinkertn@umich.edu platforms/vexpress_gem5_v1_base.dtsi 514202Sbinkertn@umich.edu 524202Sbinkertn@umich.eduVEXPRESS_GEM5_V2_DTSIS=\ 534202Sbinkertn@umich.edu platforms/vexpress_gem5_v2.dtsi \ 5412334Sgabeblack@google.com platforms/vexpress_gem5_v2_base.dtsi 554202Sbinkertn@umich.edu 564202Sbinkertn@umich.eduGEN_DTS=mkdir -p .gen; \ 5712366Sgabeblack@google.com $(CPP) -x assembler-with-cpp \ 584202Sbinkertn@umich.edu $(DTC_CPP_FLAGS) \ 594202Sbinkertn@umich.edu -DCONF_PLATFORM=\"platforms/$(1)\" \ 609850Sandreas.hansson@arm.com -DCONF_CPUS=$(2) \ 617768SAli.Saidi@ARM.com -o $@ $< 624202Sbinkertn@umich.edu 634202Sbinkertn@umich.eduall: $(TARGETS) 644202Sbinkertn@umich.edu 654202Sbinkertn@umich.edu.gen/armv7_gem5_v1_%cpu.dts: armv7.dts $(VEXPRESS_GEM5_V1_DTSIS) 664202Sbinkertn@umich.edu $(call GEN_DTS,vexpress_gem5_v1.dtsi,$*) 6712379Sgabeblack@google.com 689500Snilay@cs.wisc.edu.gen/armv8_gem5_v1_%cpu.dts: armv8.dts $(VEXPRESS_GEM5_V1_DTSIS) 694202Sbinkertn@umich.edu $(call GEN_DTS,vexpress_gem5_v1.dtsi,$*) 704202Sbinkertn@umich.edu 719538Satgutier@umich.edu.gen/armv8_gem5_v2_%cpu.dts: armv8.dts $(VEXPRESS_GEM5_V2_DTSIS) 724202Sbinkertn@umich.edu $(call GEN_DTS,vexpress_gem5_v2.dtsi,$*) 734202Sbinkertn@umich.edu 745222Sksewell@umich.edu.gen/armv8_gem5_v1_big_little%.dts: armv8_big_little.dts \ 754202Sbinkertn@umich.edu $(VEXPRESS_GEM5_V1_DTSIS) 764202Sbinkertn@umich.edu $(call GEN_DTS,vexpress_gem5_v1.dtsi,$*) 774202Sbinkertn@umich.edu 784202Sbinkertn@umich.edu%.dtb: .gen/%.dts 794202Sbinkertn@umich.edu $(DTC) -I dts -O dtb -o $@ $< 804202Sbinkertn@umich.edu 8112316Sgabeblack@google.com 8212316Sgabeblack@google.comclean: 838335Snate@binkert.org $(RM) -r .gen 848335Snate@binkert.org $(RM) *.dtb 858335Snate@binkert.org