-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
90 lines (75 loc) · 3.28 KB
/
Makefile.am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#####################################################################################
# Copyright 2015 Barcelona Supercomputing Center #
# #
# This file is part of the NANOS++ library. #
# #
# NANOS++ is free software: you can redistribute it and/or modify #
# it under the terms of the GNU Lesser General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. #
# #
# NANOS++ is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU Lesser General Public License for more details. #
# #
# You should have received a copy of the GNU Lesser General Public License #
# along with NANOS++. If not, see <http://www.gnu.org/licenses/>. #
#####################################################################################
SUBDIRS = . src tests doc scripts
DIST_SUBDIRS = tests doc src scripts
EXTRA_DIST = ChangeLog
ACLOCAL_AMFLAGS=-I m4
devincludedir = $(prefix)/include/nanox-dev
nodist_devinclude_HEADERS = nanox-config.h
# We use an install hook to remove old deprecated libraries, which are not tracked
# anymore by Automake so they need to be removed manually
REMOVE_LIBS = \
libnanox-ss \
libnanox-sched-affinity-smartpriority \
$(END)
#######
##
#######
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = nanox-debug.pc nanox-performance.pc
DISTCLEANFILES = $(pkgconfig_DATA)
EXTRA_DIST += nanox-debug.pc.in nanox-performance.pc.in
#######
remove-old-libraries:
@for oldlib in $(REMOVE_LIBS); do \
for version in performance debug instrumentation instrumentation-debug; do \
for f in $(libdir)/$${version}/$${oldlib}*; do \
if test -e $${f}; then \
echo "Removing old library $${f}"; \
rm -f $${f}; \
fi \
done \
done \
done
REMOVE_CFGS = \
paraver_configs/hwc/papi/performance/ipc.cfg \
$(END)
remove-old-cfgs:
@for cfg in $(REMOVE_CFGS); do \
for f in $(docdir)/$${cfg}; do \
if test -e $${f}; then \
echo "Removing old cfg $${f}"; \
rm -f $${f}; \
fi \
done \
done
install-exec-hook: remove-old-libraries remove-old-cfgs
rpm: dist-gzip
$(MAKE) -C scripts rpm
deb: dist-gzip
$(MAKE) -C scripts deb
dist-hook:
if [ -x "$(GIT)" ]; \
then \
"$(GIT)" --git-dir=$(top_srcdir)/.git log --pretty=format:"[%h] %cd : %s (%an)" --date=short > $(distdir)/ChangeLog; \
echo "@NANOX_BUILD_VERSION@" > ${distdir}/VERSION; \
elif [ -e $(top_srcdir)/VERSION ]; \
then \
cp $(top_srcdir)/VERSION $(distdir)/VERSION; \
fi