--- a/Makefile
+++ b/Makefile
@@ -14,17 +14,17 @@
 MAKEFLAGS += --no-print-directory
 endif
 
-PREFIX?=/usr
-SBINDIR?=/sbin
-CONFDIR?=/etc/iproute2
-NETNS_RUN_DIR?=/var/run/netns
-NETNS_ETC_DIR?=/etc/netns
+PREFIX?=@TERMUX_PREFIX@
+SBINDIR?=$(PREFIX)/bin
+CONFDIR?=$(PREFIX)/etc/iproute2
+NETNS_RUN_DIR?=$(PREFIX)/var/run/netns
+NETNS_ETC_DIR?=$(PREFIX)/etc/netns
 DATADIR?=$(PREFIX)/share
 HDRDIR?=$(PREFIX)/include/iproute2
 DOCDIR?=$(DATADIR)/doc/iproute2
 MANDIR?=$(DATADIR)/man
-ARPDDIR?=/var/lib/arpd
-KERNEL_INCLUDE?=/usr/include
+ARPDDIR?=$(PREFIX)/var/lib/arpd
+KERNEL_INCLUDE?=$(PREFIX)/include
 BASH_COMPDIR?=$(DATADIR)/bash-completion/completions
 
 # Path to db_185.h include