Commit 8c810123 authored by Dimitris Lampridis's avatar Dimitris Lampridis

bld: software installation cleanup

parent 31cd1dee
......@@ -2,8 +2,6 @@
#
# SPDX-FileCopyrightText: 2019 CERN
PREFIX ?= /
all:
$(MAKE) -C software
......
......@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: LGPL-2.1-or-later
PREFIX ?= /
PREFIX ?= /usr/local
GIT_VERSION := $(shell git describe --always --dirty --long --tags)
VERSION := $(shell git describe --tags --abbrev=0 | tr -d 'v')
......
......@@ -26,10 +26,10 @@ tools: lib
.PHONY: all clean modules install modules_install $(DIRS)
.PHONY: prereq_install prereq_install_warn
.PHONY: gtags cppcheck
.PHONY: release
install modules_install: prereq_install_warn
$(DIRS):
$(MAKE) -C $@ $(TARGET)
......
......@@ -2,9 +2,11 @@
#
# SPDX-FileCopyrightText: 2019 CERN
PREFIX ?= /
INCLUDEDESTDIR ?= $(PREFIX)/usr/local/include
TOP_DIR ?= $(shell pwd)/../..
TRTL ?= $(TOP_DIR)
include $(TRTL)/common.mk
INCLUDEDESTDIR ?= $(PREFIX)/include
all:
ifneq ($(wildcard ./mockturtle/hw/Makefile),) # Removed during distribution
......
......@@ -18,6 +18,7 @@ include $(TRTL)/common.mk
#
KVERSION ?= $(shell uname -r)
KERNELSRC ?= /lib/modules/$(KVERSION)/build
INSTALL_MOD_PATH ?= /
#
# Local targets
......@@ -32,7 +33,7 @@ clean coccicheck modules: hw_header
$@
modules_install: modules
$(MAKE) -C $(KERNELSRC) M=$(shell /bin/pwd) INSTALL_MOD_PATH=$(PREFIX) $@
$(MAKE) -C $(KERNELSRC) M=$(shell /bin/pwd) INSTALL_MOD_PATH=$(INSTALL_MOD_PATH) $@
hw_header:
$(MAKE) -C $(TRTL_SW)/include/
......
......@@ -18,7 +18,7 @@ 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)
DESTLIBDIR ?= $(PREFIX)/usr/local/lib
DESTLIBDIR ?= $(PREFIX)/lib
LIBS = libmockturtle.so
LIBS_XYZ = $(LIBS).$(SO_VERSION_XYZ)
......
......@@ -3,4 +3,5 @@
# SPDX-FileCopyrightText: 2019 CERN
*.pyc
build
MANIFEST
......@@ -4,9 +4,15 @@
-include Makefile.specific
TOP_DIR ?= $(shell pwd)/../../..
TRTL ?= $(TOP_DIR)
include $(TRTL)/common.mk
PYTHON ?= python
all:
clean:
install:
python setup.py install
VERSION=$(VERSION) $(PYTHON) setup.py install --prefix $(PREFIX)
.PHONY: all clean install
......@@ -7,8 +7,10 @@ SPDX-FileCopyrightText: 2019 CERN
from distutils.core import setup
import os
setup(name='PyMockTurtle',
version='3.0',
version=os.environ.get('VERSION', "0.0.0"),
description='Python Module to handle Mock Turtle devices',
author='Federico Vaga',
author_email='federico.vaga@cern.ch',
......
......@@ -15,7 +15,7 @@ TOP_DIR ?= $(shell pwd)/../..
TRTL ?= $(TOP_DIR)
include $(TRTL)/common.mk
BINDESTDIR ?= $(PREFIX)/usr/local/bin
BINDESTDIR ?= $(PREFIX)/bin
CFLAGS += -Wall -Werror
CFLAGS += -I$(TRTL_SW)/include
......@@ -37,7 +37,7 @@ CPPCHECK ?= cppcheck
all: $(PROGS)
install:
install: $(PROGS)
install -d $(BINDESTDIR)
install -m 0755 $(PROGS) $(BINDESTDIR)
......
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