2021-08-14 22:00:07 +05:30
|
|
|
# This makefile uses setup.py under the hood.
|
2021-08-15 15:02:28 +05:30
|
|
|
# In ubuntu, python and pip are symlinks to python2 and pip2, not
|
|
|
|
# python3. So we have to specify python as python3 by default.
|
2021-08-01 16:58:48 +05:30
|
|
|
PYTHON := python3
|
2021-08-14 22:00:07 +05:30
|
|
|
PIP := pip3
|
2021-08-01 16:58:48 +05:30
|
|
|
DESTDIR:= /
|
|
|
|
|
2021-07-21 15:36:11 +05:30
|
|
|
all: build
|
2021-05-10 15:15:42 +05:30
|
|
|
|
2021-09-27 10:00:59 +05:30
|
|
|
build: build/lib/naxalnet/__init__.py
|
|
|
|
|
|
|
|
build/lib/naxalnet/__init__.py: naxalnet/__init__.py
|
2021-08-01 16:58:48 +05:30
|
|
|
$(PYTHON) setup.py build
|
2021-06-04 22:27:54 +05:30
|
|
|
|
2021-07-21 15:36:11 +05:30
|
|
|
install: build
|
2021-08-01 16:58:48 +05:30
|
|
|
$(PYTHON) setup.py install --root="$(DESTDIR)" --optimize=1 --skip-build
|
2021-07-26 12:44:24 +05:30
|
|
|
|
2021-08-14 22:00:07 +05:30
|
|
|
uninstall:
|
2021-08-18 17:33:46 +05:30
|
|
|
$(PIP) uninstall -y naxalnet
|
2021-08-14 22:00:07 +05:30
|
|
|
rm -rf /usr/share/naxalnet /usr/lib/systemd/system/naxalnet.service
|
2021-09-10 11:42:18 +05:30
|
|
|
@echo "The directory /etc/naxalnet was not removed." && \
|
2021-08-18 17:33:46 +05:30
|
|
|
echo "Do 'sudo make purge' to remove it."
|
2021-08-14 22:00:07 +05:30
|
|
|
|
2021-08-18 17:33:46 +05:30
|
|
|
# remove config files, like apt purge
|
2021-08-19 12:03:20 +05:30
|
|
|
purge: uninstall
|
2021-08-18 17:33:46 +05:30
|
|
|
rm -rf /etc/naxalnet
|
2021-08-14 22:00:07 +05:30
|
|
|
|
2021-07-26 12:44:24 +05:30
|
|
|
clean:
|
2021-08-16 18:56:17 +05:30
|
|
|
rm -rf build naxalnet.egg-info **/__pycache__
|