Commit 8fc00910 authored by Federico Vaga's avatar Federico Vaga

bld: put common building variables in common.mk

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 68fcb2c2
PREFIX ?= /
GIT_VERSION = $(shell cd $(TRTL); git describe --always --dirty --long --tags)
VERSION:= $(shell git describe --tags --abbrev=0 | tr -d 'v')
TRTL_SW := $(TRTL)/software
......@@ -9,7 +9,9 @@ CURDIR:=$(shell /bin/pwd)
REPO_PARENT ?= $(CURDIR)/..
-include $(REPO_PARENT)/parent_common.mk
PREFIX ?= /
TOP_DIR ?= $(shell pwd)/../
TRTL ?= $(TOP_DIR)
include $(TRTL)/common.mk
DIRS = kernel lib tools include
......@@ -20,7 +22,7 @@ kernel lib: headers
tools: lib
.PHONY: all clean modules install modules_install $(DIRS)
.PHONY: gitmodules prereq_install prereq_install_warn
.PHONY: prereq_install prereq_install_warn
.PHONY: gtags headers
install modules_install: prereq_install_warn
......
......@@ -11,14 +11,14 @@
REPO_PARENT ?= ../..
-include $(REPO_PARENT)/parent_common.mk
GIT_VERSION := $(shell git describe --dirty --long --tags)
SO_VERSION_XYZ := $(shell git describe --abbrev=0 | grep -o -E "[0-9]+\.[0-9]+\.[0-9]")
TOP_DIR ?= $(shell pwd)/../../
TRTL ?= $(TOP_DIR)
include $(TRTL)/common.mk
SO_VERSION_XYZ := $(shell echo $(VERSION) | grep -o -E "[0-9]+\.[0-9]+\.[0-9]")
SO_VERSION_X := $(shell echo $(SO_VERSION_XYZ) | cut -d "." -f 1)
PREFIX ?= /
DESTLIBDIR ?= $(PREFIX)/usr/local/lib
TRTL ?= ../..
TRTL_SW = $(TRTL)/software
LIBS = libmockturtle.so
LIBS_XYZ = $(LIBS).$(SO_VERSION_XYZ)
......
......@@ -11,12 +11,11 @@
REPO_PARENT ?= ../..
-include $(REPO_PARENT)/parent_common.mk
PREFIX ?= /
BINDESTDIR ?= $(PREFIX)/usr/local/bin
TRTL ?= ../..
TRTL_SW = $(TRTL)/software
TOP_DIR ?= $(shell pwd)/../../
TRTL ?= $(TOP_DIR)
include $(TRTL)/common.mk
GIT_VERSION := $(shell git describe --dirty --long --tags)
BINDESTDIR ?= $(PREFIX)/usr/local/bin
CFLAGS += -Wall -Werror
CFLAGS += -I$(TRTL_SW)/include
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment