Infer TRICK_HOME automatically

Refs #358
This commit is contained in:
Derek Bankieris 2016-11-30 14:12:34 -06:00
parent 9fa76d8e78
commit 3600e3880a
2 changed files with 8 additions and 4 deletions

View File

@ -5,16 +5,18 @@ RM := /bin/rm
CP := /bin/cp
PWD = $(shell /bin/pwd)
export TRICK_HOME := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))../../..)
COLOR = $(1)
ifndef TRICK_VERBOSE_BUILD
ECHO_CMD = @
endif
export TRICK_HOST_TYPE := $(shell export TRICK_HOME=$(TRICK_HOME) && $(TRICK_HOME)/bin/trick-gte TRICK_HOST_TYPE)
export TRICK_VERSION := $(shell export TRICK_HOME=$(TRICK_HOME) && $(TRICK_HOME)/bin/trick-version -v)
export TRICK_MAJOR := $(shell export TRICK_HOME=$(TRICK_HOME) && $(TRICK_HOME)/bin/trick-version -y)
export TRICK_MINOR := $(shell export TRICK_HOME=$(TRICK_HOME) && $(TRICK_HOME)/bin/trick-version -m)
export TRICK_HOST_TYPE := $(shell $(TRICK_HOME)/bin/trick-gte TRICK_HOST_TYPE)
export TRICK_VERSION := $(shell $(TRICK_HOME)/bin/trick-version -v)
export TRICK_MAJOR := $(shell $(TRICK_HOME)/bin/trick-version -y)
export TRICK_MINOR := $(shell $(TRICK_HOME)/bin/trick-version -m)
include $(TRICK_HOME)/share/trick/makefiles/config_${TRICK_HOST_TYPE}.mk
-include $(TRICK_HOME)/share/trick/makefiles/config_user.mk

View File

@ -2,6 +2,8 @@
# Makefile for Data Products Libs And Apps
#
TRICK_HOME := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))../..)
include ${TRICK_HOME}/share/trick/makefiles/Makefile.common
LIB_DIR = lib_${TRICK_HOST_CPU}