2021-08-14 18:30:07 +02:00
|
|
|
# This makefile uses setup.py under the hood.
|
2021-08-15 11:32:28 +02:00
|
|
|
# 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 13:28:48 +02:00
|
|
|
PYTHON := python3
|
2021-08-14 18:30:07 +02:00
|
|
|
PIP := pip3
|
2021-08-01 13:28:48 +02:00
|
|
|
DESTDIR:= /
|
|
|
|
|
2021-07-21 12:06:11 +02:00
|
|
|
all: build
|
2021-05-10 11:45:42 +02:00
|
|
|
|
2021-09-27 06:30:59 +02:00
|
|
|
build: build/lib/naxalnet/__init__.py
|
|
|
|
|
|
|
|
build/lib/naxalnet/__init__.py: naxalnet/__init__.py
|
2021-08-01 13:28:48 +02:00
|
|
|
$(PYTHON) setup.py build
|
2021-06-04 18:57:54 +02:00
|
|
|
|
2021-09-29 05:07:59 +02:00
|
|
|
install:
|
2021-08-01 13:28:48 +02:00
|
|
|
$(PYTHON) setup.py install --root="$(DESTDIR)" --optimize=1 --skip-build
|
2021-07-26 09:14:24 +02:00
|
|
|
|
2021-08-14 18:30:07 +02:00
|
|
|
uninstall:
|
2021-08-18 14:03:46 +02:00
|
|
|
$(PIP) uninstall -y naxalnet
|
2021-08-14 18:30:07 +02:00
|
|
|
rm -rf /usr/share/naxalnet /usr/lib/systemd/system/naxalnet.service
|
2021-09-10 08:12:18 +02:00
|
|
|
@echo "The directory /etc/naxalnet was not removed." && \
|
2021-08-18 14:03:46 +02:00
|
|
|
echo "Do 'sudo make purge' to remove it."
|
2021-08-14 18:30:07 +02:00
|
|
|
|
2021-08-18 14:03:46 +02:00
|
|
|
# remove config files, like apt purge
|
2021-08-19 08:33:20 +02:00
|
|
|
purge: uninstall
|
2021-08-18 14:03:46 +02:00
|
|
|
rm -rf /etc/naxalnet
|
2021-08-14 18:30:07 +02:00
|
|
|
|
2021-07-26 09:14:24 +02:00
|
|
|
clean:
|
2021-08-16 15:26:17 +02:00
|
|
|
rm -rf build naxalnet.egg-info **/__pycache__
|