-DESTDIR=
-SBINDIR=/usr/sbin
+DESTDIR=/usr/
+SBINDIR=/sbin
CONFDIR=/etc/iproute2
-DOCDIR=/usr/share/doc/iproute2
-MANDIR=/usr/share/man
+DOCDIR=/share/doc/iproute2
+MANDIR=/share/man
# Path to db_185.h include
DBM_INCLUDE:=/usr/include
-DEFINES= -DRESOLVE_HOSTNAMES
+DEFINES= -DRESOLVE_HOSTNAMES -DDESTDIR=\"$(DESTDIR)\"
#options if you have a bind>=4.9.4 libresolv (or, maybe, glibc)
LDLIBS=-lresolv
#include "ip_common.h"
#define IPLINK_IOCTL_COMPAT 1
+#ifndef DESTDIR
+#define DESTDIR "/usr/"
+#endif
static void usage(void) __attribute__((noreturn));
if (strcmp(l->id, id) == 0)
return l;
- snprintf(buf, sizeof(buf), "/usr/lib/ip/link_%s.so", id);
+ snprintf(buf, sizeof(buf), DESTDIR "/lib/ip/link_%s.so", id);
dlh = dlopen(buf, RTLD_LAZY);
if (dlh == NULL) {
/* look in current binary, only open once */
$(HOSTCC) $(CCOPTS) -I../include -o $@ $@.c -lm
install: all
- mkdir -p $(DESTDIR)/usr/lib/tc
+ mkdir -p $(DESTDIR)/lib/tc
for i in $(DISTDATA); \
- do install -m 755 $$i $(DESTDIR)/usr/lib/tc; \
+ do install -m 755 $$i $(DESTDIR)/lib/tc; \
done
clean:
$(AR) rcs $@ $(TCLIB)
install: all
- mkdir -p $(DESTDIR)/usr/lib/tc
+ mkdir -p $(DESTDIR)/lib/tc
install -m 0755 tc $(DESTDIR)$(SBINDIR)
for i in $(TCSO); \
- do install -m 755 $$i $(DESTDIR)/usr/lib/tc; \
+ do install -m 755 $$i $(DESTDIR)/lib/tc; \
done
clean:
#include "utils.h"
#include "tc_util.h"
+#ifndef DESTDIR
+#define DESTDIR "/usr/"
+#endif
+
const char *get_tc_lib(void)
{
const char *lib_dir;
lib_dir = getenv("TC_LIB_DIR");
if (!lib_dir)
- lib_dir = "/usr/lib/tc";
+ lib_dir = DESTDIR "/lib/tc";
return lib_dir;
}