Description: - Fix upstream Makefile and add hardening.
             - Fix building directory independent of architecture.
Author: Giovani Agusuto Ferreira <giovani@riseup.net>
Last-Update: 2015-06-28
Index: netstress-1.2.0/Makefile
===================================================================
--- netstress-1.2.0.orig/Makefile
+++ netstress-1.2.0/Makefile
@@ -5,7 +5,7 @@
 
 CURDIR=$(shell basename $(shell pwd))
 
-CFLAGS+=-O2 -Wall ${INC}
+CFLAGS += -O2 -Wall ${INC}
 #CFLAGS+=-g -Wall ${INC}
 
 BIN_DIR=/usr/sbin
@@ -27,7 +27,7 @@ endif
 ifeq (${ARCH},x86_64)
   ARCH:=amd64
 endif
-
+ARCH:=build
 ##############################################################################
 
 PKGname:=$(shell grep -e "[^[:space:]]" PKGname)
@@ -42,13 +42,13 @@ all: ${ARCH}/netstress
 ##############################################################################
 
 ${ARCH}/netstress: ${ARCH}/netstress.o
-	${CC} ${CFLAGS} -o $@ $^
+	${CC} ${CFLAGS} ${LDFLAGS} ${CPPFLAGS} -o $@ $^
 
 ##############################################################################
 
 ${ARCH}/%.o: %.c
 	@mkdir -v -p ${ARCH}
-	${CC} ${CFLAGS} -c -o $@ $^
+	${CC} ${CFLAGS} ${LDFLAGS} ${CPPFLAGS} -c -o $@ $^
 
 ##############################################################################
 
