# ------------ Compiler / Linker Options -------------------------------
+
+ifndef DESTDIR
+ DESTDIR=..
+endif
+
ifdef ETRAX
AXIS_USABLE_LIBS = UCLIBC GLIBC
include $(AXIS_TOP_DIR)/tools/build/Rules.axis
$(CC) -MM $(CFLAGS) $(CPPFLAGS) $(INCDIR) *.c
install: $(TARGETS) $(LIB_TARGETS)
- mkdir -m 2775 -p ../binlocal ../liblocal ../include
- install -m 775 $(TARGETS) ../binlocal/
- install -m 775 $(LIB_TARGETS) ../liblocal/
-
+ mkdir -p $(DESTDIR)/binlocal $(DESTDIR)/liblocal $(DESTDIR)/include
+ install -m 775 $(TARGETS) $(DESTDIR)/binlocal/
+ install -m 664 $(LIB_TARGETS) $(DESTDIR)/liblocal/
ifdef PEXOR
- install -m 664 trbnet.h trberror.h pexor_user.h ../include/
+ install -m 664 trbnet.h trberror.h pexor_user.h $(DESTDIR)/include/
else
- install -m 664 trbnet.h trberror.h ../include/
+ install -m 664 trbnet.h trberror.h $(DESTDIR)/include/
endif
# ------------ Dependencies --------------------------------------------
.PHONY: install
install: Makefile
ifndef DESTDIR
- make -f Makefile DESTDIR=../lib install
+ make -f Makefile install
else
make -f Makefile install
endif
# ------------ Compiler / Linker Options -------------------------------
+ifndef DESTDIR
+ DESTDIR=..
+endif
+
ARCH=$(shell uname -m)
ifeq ($(shell uname -m), x86_64)
CPPFLAGS = -DPEXOR -DX86_64
$(CC) -MM $(CFLAGS) $(CPPFLAGS) $(INCDIR) *.c
install: pexorflash kernel-driver
- mkdir -m 2775 -p ../binlocal/
- install -m 775 pexorflash ../binlocal/
+ mkdir -p $(DESTDIR)/binlocal/
+ install -m 775 pexorflash $(DESTDIR)/binlocal/
make -C kernel-module install
# ------------ Dependencies --------------------------------------------
+
+ifndef DESTDIR
+ DESTDIR=../..
+endif
+
+# ----------------------------------------------------------------------
+
obj-m := pexor.o
pexor-objs := pexor_trb.o
$(MAKE) -C $(KERNELDIR) M=$(PWD) clean
install: $(TARGETS)
- mkdir -m 2775 -p ../../kernel-modules
- install -m 775 $(TARGETS) ../../kernel-modules/
+ mkdir -p $(DESTDIR)/kernel-modules
+ install -m 775 $(TARGETS) $(DESTDIR)/kernel-modules/
# ------------ Dependencies --------------------------------------------
# ------------ Compiler / Linker Options -------------------------------
+ifndef DESTDIR
+ DESTDIR=..
+endif
+
ARCH=$(shell uname -m)
ifeq ($(shell uname -m), x86_64)
CPPFLAGS = -DX86_64
$(CC) -MM $(CFLAGS) $(CPPFLAGS) $(INCDIR) *.c
install: $(TARGETS) server
- mkdir -m 2775 -p ../bin ../lib
- install -m 775 $(TARGETS) ../bin/
- install -m 775 $(LIB_TARGETS) ../lib/
+ mkdir -p $(DESTDIR)/bin $(DESTDIR)/lib
+ install -m 775 $(TARGETS) $(DESTDIR)/bin/
+ install -m 664 $(LIB_TARGETS) $(DESTDIR)/lib/
make -C server install
# ------------ Dependencies --------------------------------------------
# ------------ Compiler / Linker Options -------------------------------
+ifndef DESTDIR
+ DESTDIR=../..
+endif
+
ifdef ETRAX
AXIS_USABLE_LIBS = UCLIBC GLIBC
include $(AXIS_TOP_DIR)/tools/build/Rules.axis
$(CC) -MM $(CFLAGS) $(CPPFLAGS) $(INCDIR) *.c
install: $(TARGETS)
- mkdir -m 2775 -p ../../binlocal
- install -m 775 $(TARGETS) ../../binlocal/
+ mkdir -p $(DESTDIR)/binlocal
+ install -m 775 $(TARGETS) $(DESTDIR)/binlocal/
# ------------ Dependencies --------------------------------------------
# ------------ Compiler / Linker Options -------------------------------
+
+ifndef DESTDIR
+ DESTDIR=..
+endif
+
ifdef ETRAX
AXIS_USABLE_LIBS = UCLIBC GLIBC
include $(AXIS_TOP_DIR)/tools/build/Rules.axis
$(CC) -MM $(CFLAGS) $(CPPFLAGS) $(INCDIR) *.c
install: $(TARGETS)
- mkdir -m 2775 -p ../binlocal
- install -m 775 $(TARGETS) ../binlocal/
+ mkdir -p $(DESTDIR)/binlocal
+ install -m 775 $(TARGETS) $(DESTDIR)/binlocal/
# ------------ Dependencies --------------------------------------------