forked from Xilinx/RAFT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
66 lines (57 loc) · 2.53 KB
/
Makefile
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
# Copyright (C) 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.
# SPDX-License-Identifier: MIT
SUBDIRS := c_lib/i2c-driver c_lib/libaximemmap c_lib/libxhelper c_lib/sysmon-driver
INSTALL_DIR_RAFT := $(DESTDIR)/usr/share/raft
INSTALL_DIR_NOTEBOOKS := ${DESTDIR}/usr/share/notebooks
.PHONY: all clean install $(SUBDIRS)
all: $(SUBDIRS)
$(SUBDIRS):
$(MAKE) -C $@
clean:
for dir in $(SUBDIRS); do \
$(MAKE) -C $$dir clean; \
done
install:
for dir in $(SUBDIRS); do \
$(MAKE) DESTDIR=$(DESTDIR) -C $$dir install; \
done
install -d $(INSTALL_DIR_RAFT)
cp -r LICENSE docs examples xclient xserver README.md $(INSTALL_DIR_RAFT)
echo "Macros: DESTDIR=${DESTDIR}, Notebooks = ${NOTEBOOKS}, \
STARTUPSC = ${STARTUPSC}, STARTUP = ${STARTUP}, SYSCONF_DIR = ${SYSCONF_DIR}, \
BINDIR = ${BINDIR}, SYSTEM_UNIT_DIR = ${SYSTEM_UNIT_DIR} "
ifeq ($(NOTEBOOKS),enabled)
echo "Installing Notebooks to ${INSTALL_DIR_NOTEBOOKS}"
install -d ${INSTALL_DIR_NOTEBOOKS}
install -m 0755 examples/python/pat/pat20.py ${INSTALL_DIR_NOTEBOOKS}
install -m 0755 examples/python/pat/Pat20.ipynb ${INSTALL_DIR_NOTEBOOKS}
install -m 0755 examples/python/rftool/rftool.py ${INSTALL_DIR_NOTEBOOKS}
install -m 0755 examples/python/rftool/mixer.ipynb ${INSTALL_DIR_NOTEBOOKS}
endif
ifeq ($(STARTUPSC),enabled)
ifneq ($(SYSCONF_DIR),)
echo "Installing RAFT system controller startup sysconfdir at ${SYSCONF_DIR}"
install -d ${SYSCONF_DIR}
install -m 0755 xserver/init/startup/system-controller/raft-startup ${SYSCONF_DIR}
endif
echo "Installing RAFT system controller startup to bindir at ${BINDIR}"
install -d ${BINDIR}
install -m 0777 xserver/init/startup/system-controller/raft-startup ${BINDIR}
echo "Installing RAFT system controller startup to system unit dir at${SYSTEM_UNIT_DIR}"
install -d ${SYSTEM_UNIT_DIR}
install -m 0644 xserver/init/startup/system-controller/raft-startup.service ${SYSTEM_UNIT_DIR}
endif
ifeq ($(STARTUP), enabled)
ifneq ($(SYSCONF_DIR),)
echo "Installing RAFT jupyter startup to sysconfdir at ${SYSCONF_DIR}"
install -d ${SYSCONF_DIR}
install -m 0755 xserver/init/startup/raftjupyter-startup/raft-startup ${SYSCONF_DIR}
endif
echo "Installing RAFT jupyter startup to to bindir at ${BINDIR}"
install -d ${BINDIR}
install -m 0777 xserver/init/startup/raftjupyter-startup/raft-startup ${BINDIR}
echo "Installing RAFT jupyter startup to system unit dir at ${SYSTEM_UNIT_DIR}"
install -d ${SYSTEM_UNIT_DIR}
install -m 0644 xserver/init/startup/raftjupyter-startup/raft-startup.service ${SYSTEM_UNIT_DIR}
endif
.PHONY: install