megactl/debian/patches/005-Makefile.dpatch
2017-04-22 15:01:27 +02:00

34 lines
1.0 KiB
Plaintext
Executable File

#! /bin/sh /usr/share/dpatch/dpatch-run
## 004-Makefile.dpatch by Mario Fetka (geos_one) <mario.fetka@gmail.com>
##
## DP: megatrace must be build with m32 on 64bit hosts
## DP: thx. to gentoo devs
@DPATCH@
diff -urN megactl-0.4.1.orig/src/Makefile megactl-0.4.1/src/Makefile
--- megactl-0.4.1.orig/src/Makefile 2007-08-21 09:19:53.000000000 +0200
+++ megactl-0.4.1/src/Makefile 2009-11-21 12:30:44.242501898 +0100
@@ -1,11 +1,17 @@
-SRCS= megactl.c adapter.c megaioctl.c megatrace.c callinfo.c dumpbytes.c logpage.c ntrim.c
+SRCS= megactl.c adapter.c megaioctl.c callinfo.c dumpbytes.c logpage.c ntrim.c
INC= -I./schily -Iincludes-hack
HDRS= mega.h adapter.h megaioctl.h callinfo.h logpage.h dumpbytes.h
-ARCH= -m32
-CFLAGS= -g -Wall $(INC) $(ARCH)
-LDFLAGS= -g $(ARCH)
-PROGRAMS= megactl megasasctl megatrace
+ARCH?= -m32
+CFLAGS?= -g -Wall
+CFLAGS+= $(INC) $(ARCH)
+LDFLAGS?= -g
+LDFLAGS+= $(ARCH)
+PROGRAMS= megactl megasasctl
+ifeq ($(ARCH),-m32)
+PROGRAMS+= megatrace
+SRCS+= megatrace.c
+endif
all: $(PROGRAMS)