Makefile revision 10915:71ace17ccb3d
12SN/A# 210688Sandreas.hansson@arm.com# Copyright (c) 2014-2015 ARM Limited 310688Sandreas.hansson@arm.com# All rights reserved 410688Sandreas.hansson@arm.com# 510688Sandreas.hansson@arm.com# Licensed under the Apache License, Version 2.0 (the "License"); 610688Sandreas.hansson@arm.com# you may not use this file except in compliance with the License. 710688Sandreas.hansson@arm.com# You may obtain a copy of the License at 810688Sandreas.hansson@arm.com# 910688Sandreas.hansson@arm.com# http://www.apache.org/licenses/LICENSE-2.0 1010688Sandreas.hansson@arm.com# 1110688Sandreas.hansson@arm.com# Unless required by applicable law or agreed to in writing, software 1210688Sandreas.hansson@arm.com# distributed under the License is distributed on an "AS IS" BASIS, 1310688Sandreas.hansson@arm.com# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 141762SN/A# See the License for the specific language governing permissions and 152SN/A# limitations under the License. 162SN/A# 172SN/A# Authors: Andreas Sandberg 182SN/A 192SN/ADOXYGEN = doxygen 202SN/A 212SN/AGCC_VERSION := $(shell $(CC) -dumpversion | sed -e 's/\.//g') 222SN/Aifeq "$(shell expr $(GCC_VERSION) \< 47)" "1" 232SN/A$(error Default GCC version is too old. Please use gcc 4.7 or newer.) 242SN/Aendif 252SN/A 262SN/ACPPFLAGS = -Iinclude/ 272SN/ACFLAGS = -fvisibility=hidden -O1 -g -Wall 282SN/ACXXFLAGS = -std=c++0x $(CFLAGS) 292SN/ALDFLAGS= 302SN/A 312SN/ALIB_CPPFLAGS = $(CPPFLAGS) 322SN/ALIB_CFLAGS = $(CFLAGS) -fPIC 332SN/ALIB_CXXFLAGS = $(CXXFLAGS) -fPIC 342SN/ALIB_LDFLAGS= $(LDFLAGS) -shared 352SN/A 362SN/A# Default targets 372SN/AALL := 382SN/A 392665SN/A# Test targets 402665SN/AALL_TESTS := 412665SN/A 4210688Sandreas.hansson@arm.com# Dependency includes 432SN/ADEPS := 442SN/A 451400SN/A# Files/directories to remove in the clean target 461400SN/ACLEAN := 472SN/A 481298SN/Aall: _all 4910688Sandreas.hansson@arm.com 501298SN/Adir:=lib 511298SN/Ainclude $(dir)/Rules.mk 528229Snate@binkert.org 535034SN/Adir:=tests 541400SN/Ainclude $(dir)/Rules.mk 55695SN/A 562SN/A_all: $(ALL) 5710688Sandreas.hansson@arm.com 5810688Sandreas.hansson@arm.comtest: $(ALL_TESTS) 5910688Sandreas.hansson@arm.com @set -e; \ 6010688Sandreas.hansson@arm.com for T in $^ ; do \ 6110688Sandreas.hansson@arm.com echo "Running $${T}"; \ 6210688Sandreas.hansson@arm.com ./$${T}; \ 6310688Sandreas.hansson@arm.com done 6410688Sandreas.hansson@arm.com 6510688Sandreas.hansson@arm.comdocs: 6610688Sandreas.hansson@arm.com $(DOXYGEN) Doxyfile 6710688Sandreas.hansson@arm.com 6810688Sandreas.hansson@arm.comdepclean: 6910688Sandreas.hansson@arm.com $(RM) $(DEPS) 703187SN/A 712SN/Aclean: 7210688Sandreas.hansson@arm.com $(RM) -r $(CLEAN) 732SN/A $(RM) -r docs/html 7410688Sandreas.hansson@arm.com 755034SN/A 765034SN/A.PHONY: all _all test depclean clean docs 772SN/A 782SN/A# Include dependencies 791634SN/A-include $(MODEL_OBJS:.o=.d) 8013784Sgabeblack@google.com-include $(LIBMIDGARDMODEL_OBJS:.o=.d) 8113784Sgabeblack@google.com-include $(LIBNOMALI_OBJS:.o=.d) 823187SN/A