Makefile revision 10915
1955SN/A# 2955SN/A# Copyright (c) 2014-2015 ARM Limited 31762SN/A# All rights reserved 4955SN/A# 5955SN/A# Licensed under the Apache License, Version 2.0 (the "License"); 6955SN/A# you may not use this file except in compliance with the License. 7955SN/A# You may obtain a copy of the License at 8955SN/A# 9955SN/A# http://www.apache.org/licenses/LICENSE-2.0 10955SN/A# 11955SN/A# Unless required by applicable law or agreed to in writing, software 12955SN/A# distributed under the License is distributed on an "AS IS" BASIS, 13955SN/A# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14955SN/A# See the License for the specific language governing permissions and 15955SN/A# limitations under the License. 16955SN/A# 17955SN/A# Authors: Andreas Sandberg 18955SN/A 19955SN/ADOXYGEN = doxygen 20955SN/A 21955SN/AGCC_VERSION := $(shell $(CC) -dumpversion | sed -e 's/\.//g') 22955SN/Aifeq "$(shell expr $(GCC_VERSION) \< 47)" "1" 23955SN/A$(error Default GCC version is too old. Please use gcc 4.7 or newer.) 24955SN/Aendif 25955SN/A 26955SN/ACPPFLAGS = -Iinclude/ 27955SN/ACFLAGS = -fvisibility=hidden -O1 -g -Wall 282665Ssaidi@eecs.umich.eduCXXFLAGS = -std=c++0x $(CFLAGS) 294762Snate@binkert.orgLDFLAGS= 30955SN/A 315522Snate@binkert.orgLIB_CPPFLAGS = $(CPPFLAGS) 326143Snate@binkert.orgLIB_CFLAGS = $(CFLAGS) -fPIC 334762Snate@binkert.orgLIB_CXXFLAGS = $(CXXFLAGS) -fPIC 345522Snate@binkert.orgLIB_LDFLAGS= $(LDFLAGS) -shared 35955SN/A 365522Snate@binkert.org# Default targets 37955SN/AALL := 385522Snate@binkert.org 394202Sbinkertn@umich.edu# Test targets 405742Snate@binkert.orgALL_TESTS := 41955SN/A 424381Sbinkertn@umich.edu# Dependency includes 434381Sbinkertn@umich.eduDEPS := 448334Snate@binkert.org 45955SN/A# Files/directories to remove in the clean target 46955SN/ACLEAN := 474202Sbinkertn@umich.edu 48955SN/Aall: _all 494382Sbinkertn@umich.edu 504382Sbinkertn@umich.edudir:=lib 514382Sbinkertn@umich.eduinclude $(dir)/Rules.mk 526654Snate@binkert.org 535517Snate@binkert.orgdir:=tests 548614Sgblack@eecs.umich.eduinclude $(dir)/Rules.mk 557674Snate@binkert.org 566143Snate@binkert.org_all: $(ALL) 576143Snate@binkert.org 586143Snate@binkert.orgtest: $(ALL_TESTS) 598233Snate@binkert.org @set -e; \ 608233Snate@binkert.org for T in $^ ; do \ 618233Snate@binkert.org echo "Running $${T}"; \ 628233Snate@binkert.org ./$${T}; \ 638233Snate@binkert.org done 648334Snate@binkert.org 658334Snate@binkert.orgdocs: 6610453SAndrew.Bardsley@arm.com $(DOXYGEN) Doxyfile 6710453SAndrew.Bardsley@arm.com 688233Snate@binkert.orgdepclean: 698233Snate@binkert.org $(RM) $(DEPS) 708233Snate@binkert.org 718233Snate@binkert.orgclean: 728233Snate@binkert.org $(RM) -r $(CLEAN) 738233Snate@binkert.org $(RM) -r docs/html 746143Snate@binkert.org 758233Snate@binkert.org 768233Snate@binkert.org.PHONY: all _all test depclean clean docs 778233Snate@binkert.org 786143Snate@binkert.org# Include dependencies 796143Snate@binkert.org-include $(MODEL_OBJS:.o=.d) 806143Snate@binkert.org-include $(LIBMIDGARDMODEL_OBJS:.o=.d) 816143Snate@binkert.org-include $(LIBNOMALI_OBJS:.o=.d) 828233Snate@binkert.org