Makefile revision 10915:71ace17ccb3d
14120Sgblack@eecs.umich.edu# 24120Sgblack@eecs.umich.edu# Copyright (c) 2014-2015 ARM Limited 34120Sgblack@eecs.umich.edu# All rights reserved 44120Sgblack@eecs.umich.edu# 54120Sgblack@eecs.umich.edu# Licensed under the Apache License, Version 2.0 (the "License"); 64120Sgblack@eecs.umich.edu# you may not use this file except in compliance with the License. 74120Sgblack@eecs.umich.edu# You may obtain a copy of the License at 84120Sgblack@eecs.umich.edu# 94120Sgblack@eecs.umich.edu# http://www.apache.org/licenses/LICENSE-2.0 104120Sgblack@eecs.umich.edu# 114120Sgblack@eecs.umich.edu# Unless required by applicable law or agreed to in writing, software 124120Sgblack@eecs.umich.edu# distributed under the License is distributed on an "AS IS" BASIS, 134120Sgblack@eecs.umich.edu# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 144120Sgblack@eecs.umich.edu# See the License for the specific language governing permissions and 154120Sgblack@eecs.umich.edu# limitations under the License. 164120Sgblack@eecs.umich.edu# 174120Sgblack@eecs.umich.edu# Authors: Andreas Sandberg 184120Sgblack@eecs.umich.edu 194120Sgblack@eecs.umich.eduDOXYGEN = doxygen 204120Sgblack@eecs.umich.edu 214120Sgblack@eecs.umich.eduGCC_VERSION := $(shell $(CC) -dumpversion | sed -e 's/\.//g') 224120Sgblack@eecs.umich.eduifeq "$(shell expr $(GCC_VERSION) \< 47)" "1" 234120Sgblack@eecs.umich.edu$(error Default GCC version is too old. Please use gcc 4.7 or newer.) 244120Sgblack@eecs.umich.eduendif 254120Sgblack@eecs.umich.edu 264120Sgblack@eecs.umich.eduCPPFLAGS = -Iinclude/ 274120Sgblack@eecs.umich.eduCFLAGS = -fvisibility=hidden -O1 -g -Wall 284120Sgblack@eecs.umich.eduCXXFLAGS = -std=c++0x $(CFLAGS) 294120Sgblack@eecs.umich.eduLDFLAGS= 304120Sgblack@eecs.umich.edu 314120Sgblack@eecs.umich.eduLIB_CPPFLAGS = $(CPPFLAGS) 324120Sgblack@eecs.umich.eduLIB_CFLAGS = $(CFLAGS) -fPIC 334120Sgblack@eecs.umich.eduLIB_CXXFLAGS = $(CXXFLAGS) -fPIC 344120Sgblack@eecs.umich.eduLIB_LDFLAGS= $(LDFLAGS) -shared 354120Sgblack@eecs.umich.edu 364120Sgblack@eecs.umich.edu# Default targets 374120Sgblack@eecs.umich.eduALL := 384120Sgblack@eecs.umich.edu 394120Sgblack@eecs.umich.edu# Test targets 404120Sgblack@eecs.umich.eduALL_TESTS := 414120Sgblack@eecs.umich.edu 424120Sgblack@eecs.umich.edu# Dependency includes 434120Sgblack@eecs.umich.eduDEPS := 444120Sgblack@eecs.umich.edu 454120Sgblack@eecs.umich.edu# Files/directories to remove in the clean target 464120Sgblack@eecs.umich.eduCLEAN := 474120Sgblack@eecs.umich.edu 484120Sgblack@eecs.umich.eduall: _all 494120Sgblack@eecs.umich.edu 504120Sgblack@eecs.umich.edudir:=lib 514120Sgblack@eecs.umich.eduinclude $(dir)/Rules.mk 524120Sgblack@eecs.umich.edu 534120Sgblack@eecs.umich.edudir:=tests 544120Sgblack@eecs.umich.eduinclude $(dir)/Rules.mk 554120Sgblack@eecs.umich.edu 564120Sgblack@eecs.umich.edu_all: $(ALL) 574120Sgblack@eecs.umich.edu 584120Sgblack@eecs.umich.edutest: $(ALL_TESTS) 594120Sgblack@eecs.umich.edu @set -e; \ 604120Sgblack@eecs.umich.edu for T in $^ ; do \ 615124Sgblack@eecs.umich.edu echo "Running $${T}"; \ 625237Sgblack@eecs.umich.edu ./$${T}; \ 635236Sgblack@eecs.umich.edu done 645124Sgblack@eecs.umich.edu 655124Sgblack@eecs.umich.edudocs: 665124Sgblack@eecs.umich.edu $(DOXYGEN) Doxyfile 675086Sgblack@eecs.umich.edu 685236Sgblack@eecs.umich.edudepclean: 695086Sgblack@eecs.umich.edu $(RM) $(DEPS) 705086Sgblack@eecs.umich.edu 715086Sgblack@eecs.umich.educlean: 725086Sgblack@eecs.umich.edu $(RM) -r $(CLEAN) 735086Sgblack@eecs.umich.edu $(RM) -r docs/html 745086Sgblack@eecs.umich.edu 755086Sgblack@eecs.umich.edu 765086Sgblack@eecs.umich.edu.PHONY: all _all test depclean clean docs 775086Sgblack@eecs.umich.edu 785086Sgblack@eecs.umich.edu# Include dependencies 795086Sgblack@eecs.umich.edu-include $(MODEL_OBJS:.o=.d) 805245Sgblack@eecs.umich.edu-include $(LIBMIDGARDMODEL_OBJS:.o=.d) 815245Sgblack@eecs.umich.edu-include $(LIBNOMALI_OBJS:.o=.d) 825118Sgblack@eecs.umich.edu