Package: shhmsg / 1.4.2-1

01-makefile-buildflags.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Description: Include CFLAGS and LDFLAGS in Makefile
 This patch modifies the Makefile to build this package with flags set by
 dpkg-buildflags.
Author: Emanuele Rocca <ema@debian.org>

--- shhmsg-1.4.2.orig/Makefile
+++ shhmsg-1.4.2/Makefile
@@ -27,11 +27,10 @@ INSTALLPROG	= install -m 755
 MKDIRP		= install -d -m 755
 
 CC		= gcc
-OPTIM		= -O2
 
 INCDIR		= -I.
 
-CCOPT		= -s -Wall -Werror=format-security $(OPTIM) $(INCDIR) -DHAVE_STRERROR
+CCOPT		= -s -Wall -Werror=format-security $(CFLAGS) $(CPPFLAGS) $(INCDIR) -DHAVE_STRERROR -D_REENTRANT
 
 # Object files to store in the library
 LIBOBJS		= vars.o streams.o progname.o \
@@ -42,7 +41,7 @@ all: $(TARGETS)
 
 $(LIBTARGET): $(LIBOBJS)
 ifeq ($(SHARED),1)
-	$(CC) -shared -Wl,-soname,$(LIBTARGETSOMAJ) -o $(LIBTARGET) $(LIBOBJS)
+	$(CC) -shared -Wl,-soname,$(LIBTARGETSOMAJ) -o $(LIBTARGET) $(LIBOBJS) $(LDFLAGS)
 else
 	ar rcs $(LIBTARGET) $(LIBOBJS)
 endif