summaryrefslogtreecommitdiff
path: root/package/tptest/patches/patch-apps_unix_client_Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'package/tptest/patches/patch-apps_unix_client_Makefile')
-rw-r--r--package/tptest/patches/patch-apps_unix_client_Makefile34
1 files changed, 34 insertions, 0 deletions
diff --git a/package/tptest/patches/patch-apps_unix_client_Makefile b/package/tptest/patches/patch-apps_unix_client_Makefile
new file mode 100644
index 000000000..4043f3ec2
--- /dev/null
+++ b/package/tptest/patches/patch-apps_unix_client_Makefile
@@ -0,0 +1,34 @@
+ - assign CC only if not already defined
+ - add CFLAGS and LDFLAGS instead of replacing them
+ - allow for specifying DESTDIR to 'make install'
+ - drop the local subdir (openadk doesnt use this path)
+ - create the directories to install into
+--- tptest-3.1.7.orig/apps/unix/client/Makefile 2004-04-07 15:22:56.000000000 +0200
++++ tptest-3.1.7/apps/unix/client/Makefile 2010-01-28 00:00:45.000000000 +0100
+@@ -1,4 +1,4 @@
+-CC = gcc
++CC ?= gcc
+ #
+ # Use this for Linux and other systems that have makedepend
+ # instead of mkdep.
+@@ -25,8 +25,8 @@ EXTRADEFINES = -DUNIX -DLINUX
+ #
+ #EXTRADEFINES = -DUSE_GMTIME
+
+-CFLAGS = ${CDEBUG} ${EXTRADEFINES} ${INCL} -Wall
+-LDFLAGS = ${CDEBUG}
++CFLAGS += ${CDEBUG} ${EXTRADEFINES} ${INCL} -Wall
++LDFLAGS += ${CDEBUG}
+ LIBDIR =
+ LOCLIBS =
+
+@@ -69,7 +69,8 @@ clean:
+ rm -f tptestclient core *.o *.BAK *.bak *.CKP a.out tpio_unix.c tpengine.c tpcommon.c tpclient.c
+
+ install:
+- install -c -s -o bin -g bin -m 555 tptestclient /usr/local/bin
++ install -d -m 755 ${DESTDIR}/usr/bin
++ install -c -m 755 tptestclient ${DESTDIR}/usr/bin
+
+ depend:
+ ${MAKEDEPEND} ${INCL} ${SRCS} ${LIBSRCS}