From b41cd739d31fba042891eabc425ce75251eda4a7 Mon Sep 17 00:00:00 2001 From: Ludwig Maier Date: Wed, 3 Jul 2013 12:05:24 +0200 Subject: [PATCH] temp patch DESTDIR --- libtrbnet/Makefile | 16 ++++++++++------ libtrbnet_perl/makefile | 2 +- pexor/Makefile | 8 ++++++-- pexor/kernel-module/Makefile | 11 +++++++++-- trbnetd/Makefile | 10 +++++++--- trbnetd/server/Makefile | 8 ++++++-- trbrich/Makefile | 9 +++++++-- 7 files changed, 46 insertions(+), 18 deletions(-) diff --git a/libtrbnet/Makefile b/libtrbnet/Makefile index ae4ab82..01ce38c 100644 --- a/libtrbnet/Makefile +++ b/libtrbnet/Makefile @@ -1,4 +1,9 @@ # ------------ Compiler / Linker Options ------------------------------- + +ifndef DESTDIR + DESTDIR=.. +endif + ifdef ETRAX AXIS_USABLE_LIBS = UCLIBC GLIBC include $(AXIS_TOP_DIR)/tools/build/Rules.axis @@ -95,14 +100,13 @@ depend: $(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 -------------------------------------------- diff --git a/libtrbnet_perl/makefile b/libtrbnet_perl/makefile index fdee5ea..875b3c9 100644 --- a/libtrbnet_perl/makefile +++ b/libtrbnet_perl/makefile @@ -16,7 +16,7 @@ distclean: clean .PHONY: install install: Makefile ifndef DESTDIR - make -f Makefile DESTDIR=../lib install + make -f Makefile install else make -f Makefile install endif diff --git a/pexor/Makefile b/pexor/Makefile index 9139458..128365c 100644 --- a/pexor/Makefile +++ b/pexor/Makefile @@ -1,5 +1,9 @@ # ------------ Compiler / Linker Options ------------------------------- +ifndef DESTDIR + DESTDIR=.. +endif + ARCH=$(shell uname -m) ifeq ($(shell uname -m), x86_64) CPPFLAGS = -DPEXOR -DX86_64 @@ -87,8 +91,8 @@ depend: $(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 -------------------------------------------- diff --git a/pexor/kernel-module/Makefile b/pexor/kernel-module/Makefile index 0aff6aa..d75db38 100644 --- a/pexor/kernel-module/Makefile +++ b/pexor/kernel-module/Makefile @@ -1,3 +1,10 @@ + +ifndef DESTDIR + DESTDIR=../.. +endif + +# ---------------------------------------------------------------------- + obj-m := pexor.o pexor-objs := pexor_trb.o @@ -20,8 +27,8 @@ clean: $(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 -------------------------------------------- diff --git a/trbnetd/Makefile b/trbnetd/Makefile index e1eec52..125cacf 100644 --- a/trbnetd/Makefile +++ b/trbnetd/Makefile @@ -1,5 +1,9 @@ # ------------ Compiler / Linker Options ------------------------------- +ifndef DESTDIR + DESTDIR=.. +endif + ARCH=$(shell uname -m) ifeq ($(shell uname -m), x86_64) CPPFLAGS = -DX86_64 @@ -96,9 +100,9 @@ depend: $(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 -------------------------------------------- diff --git a/trbnetd/server/Makefile b/trbnetd/server/Makefile index b1b5295..5fb5d13 100644 --- a/trbnetd/server/Makefile +++ b/trbnetd/server/Makefile @@ -1,5 +1,9 @@ # ------------ Compiler / Linker Options ------------------------------- +ifndef DESTDIR + DESTDIR=../.. +endif + ifdef ETRAX AXIS_USABLE_LIBS = UCLIBC GLIBC include $(AXIS_TOP_DIR)/tools/build/Rules.axis @@ -100,8 +104,8 @@ depend: $(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 -------------------------------------------- diff --git a/trbrich/Makefile b/trbrich/Makefile index 435cf57..e70d401 100644 --- a/trbrich/Makefile +++ b/trbrich/Makefile @@ -1,4 +1,9 @@ # ------------ Compiler / Linker Options ------------------------------- + +ifndef DESTDIR + DESTDIR=.. +endif + ifdef ETRAX AXIS_USABLE_LIBS = UCLIBC GLIBC include $(AXIS_TOP_DIR)/tools/build/Rules.axis @@ -88,8 +93,8 @@ depend: $(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 -------------------------------------------- -- 2.43.0