--- brutefir-1.0o.orig/Makefile	2016-11-15 13:39:48.000000000 +0100
+++ brutefir-1.0o/Makefile	2017-03-27 06:25:27.528418184 +0200
@@ -5,12 +5,12 @@ LDFLAGS +=
 
 ###################################
 # Where to install
-INSTALL_PREFIX	= $(DESTDIR)/usr/local
+INSTALL_PREFIX	= $(DESTDIR)/usr
 
 ###################################
 # Where to find libraries, and their header files.
-LIBPATHS	= -L/usr/local/lib
-INCLUDE		= -I/usr/local/include
+LIBPATHS	=
+INCLUDE		=
 ifdef FFTW_PATH
 LIBPATHS	+= -L$(FFTW_PATH)/lib
 INCLUDE		+= -I$(FFTW_PATH)/include
@@ -21,20 +21,16 @@ endif
 FFTW_LIB	= -lfftw3 -lfftw3f
 
 ###################################
-# Binaries
-FLEX	= flex
-LD	= gcc
-CC	= gcc
-CHMOD	= chmod
 
 ###################################
 # Flags
 CC_WARN		= -Wall -Wpointer-arith -Wshadow \
 -Wcast-align -Wwrite-strings -Wstrict-prototypes \
 -Wmissing-prototypes -Wmissing-declarations -Wnested-externs
-CC_FLAGS	= $(DEFINE) -O2 $(CFLAGS) $(CPPFLAGS)
+CC_FLAGS	= $(DEFINE) $(CFLAGS) $(CPPFLAGS)
 CC_FPIC		= -fPIC
 LD_SHARED	= -shared
+CHMOD		= chmod
 CHMOD_REMOVEX	= -x
 
 ###################################
@@ -63,17 +59,12 @@ LIB_TARGETS	= cli.bflogic eq.bflogic fil
 ###################################
 # System-specific settings
 
-UNAME		= $(shell uname)
-UNAME_P         = $(shell uname -p)
-UNAME_M         = $(shell uname -m)
+UNAME		= Linux
+UNAME_M         ?=
 
 # Linux
 ifeq ($(UNAME),Linux)
-ifeq ($(UNAME_M),i586)
-BRUTEFIR_OBJS	+= $(BRUTEFIR_SSE_OBJS)
-CC_FLAGS	+= -msse
-endif
-ifeq ($(UNAME_M),i686)
+ifeq ($(UNAME_M),x86)
 BRUTEFIR_OBJS	+= $(BRUTEFIR_SSE_OBJS)
 CC_FLAGS	+= -msse
 endif
@@ -127,27 +118,27 @@ brutefir: $(BRUTEFIR_OBJS)
 	$(CC) $(LDFLAGS) $(LIBPATHS) $(LDMULTIPLEDEFS) -o $@ $(BRUTEFIR_OBJS) $(BRUTEFIR_LIBS)
 
 alsa.bfio: $(BFIO_ALSA_OBJS)
-	$(LD) $(LD_SHARED) $(LDFLAGS) $(CC_FPIC) $(LIBPATHS) -o $@ $(BFIO_ALSA_OBJS) $(BFIO_ALSA_LIBS) -lc
+	$(CC) $(LD_SHARED) $(LDFLAGS) $(CC_FPIC) $(LIBPATHS) -o $@ $(BFIO_ALSA_OBJS) $(BFIO_ALSA_LIBS) -lc
 	$(CHMOD) $(CHMOD_REMOVEX) $@
 
 oss.bfio: $(BFIO_OSS_OBJS)
-	$(LD) $(LD_SHARED) $(LDFLAGS) $(CC_FPIC) $(LIBPATHS) -o $@ $(BFIO_OSS_OBJS) -lc
+	$(CC) $(LD_SHARED) $(LDFLAGS) $(CC_FPIC) $(LIBPATHS) -o $@ $(BFIO_OSS_OBJS) -lc
 	$(CHMOD) $(CHMOD_REMOVEX) $@
 
 jack.bfio: $(BFIO_JACK_OBJS)
-	$(LD) $(LD_SHARED) $(LDFLAGS) $(CC_FPIC) $(LIBPATHS) -o $@ $(BFIO_JACK_OBJS) $(BFIO_JACK_LIBS) -lc
+	$(CC) $(LD_SHARED) $(LDFLAGS) $(CC_FPIC) $(LIBPATHS) -o $@ $(BFIO_JACK_OBJS) $(BFIO_JACK_LIBS) -lc
 	$(CHMOD) $(CHMOD_REMOVEX) $@
 
 file.bfio: $(BFIO_FILE_OBJS)
-	$(LD) $(LD_SHARED) $(LDFLAGS) $(CC_FPIC) $(LIBPATHS) -o $@ $(BFIO_FILE_OBJS) -lc
+	$(CC) $(LD_SHARED) $(LDFLAGS) $(CC_FPIC) $(LIBPATHS) -o $@ $(BFIO_FILE_OBJS) -lc
 	$(CHMOD) $(CHMOD_REMOVEX) $@
 
 cli.bflogic: $(BFLOGIC_CLI_OBJS)
-	$(LD) $(LD_SHARED) $(LDFLAGS) $(CC_FPIC) $(LIBPATHS) -o $@ $(BFLOGIC_CLI_OBJS) -lc
+	$(CC) $(LD_SHARED) $(LDFLAGS) $(CC_FPIC) $(LIBPATHS) -o $@ $(BFLOGIC_CLI_OBJS) -lc
 	$(CHMOD) $(CHMOD_REMOVEX) $@
 
 eq.bflogic: $(BFLOGIC_EQ_OBJS)
-	$(LD) $(LD_SHARED) $(LDFLAGS) $(CC_FPIC) $(LIBPATHS) -o $@ $(BFLOGIC_EQ_OBJS) -lc
+	$(CC) $(LD_SHARED) $(LDFLAGS) $(CC_FPIC) $(LIBPATHS) -o $@ $(BFLOGIC_EQ_OBJS) -lc
 	$(CHMOD) $(CHMOD_REMOVEX) $@
 
 install: $(BIN_TARGETS) $(LIB_TARGETS)
