From 669baa8308c2043060c78878e08becc4a9b4515a Mon Sep 17 00:00:00 2001
From: Florian Franzmann <bwlf@bandrate.org>
Date: Fri, 1 Nov 2019 14:22:48 +0100
Subject: [PATCH] use our CFLAGS, honour installation path

---
 Makefile.conf | 45 ++++++++++-----------------------------------
 1 file changed, 10 insertions(+), 35 deletions(-)

diff --git a/Makefile.conf b/Makefile.conf
index 5e6d3db..62ab027 100644
--- a/Makefile.conf
+++ b/Makefile.conf
@@ -44,21 +44,12 @@ endif
 
 # Installation locations (edit if required)
 
-ifneq ($(HOST),MINGW)
-  prefix=/usr/local
-  bindir=$(prefix)/bin
-  incdir=$(prefix)/include
-  libdir=$(prefix)/lib
-  docdir=$(prefix)/doc/routino
-  datadir=$(prefix)/share/routino
-else
-  prefix="c:/Program Files/Routino"
-  bindir=$(prefix)/bin
-  incdir=$(prefix)/include
-  libdir=$(prefix)/lib
-  docdir=$(prefix)/doc
-  datadir=$(prefix)/xml
-endif
+prefix=/usr
+bindir=$(prefix)/bin
+incdir=$(prefix)/include
+libdir=$(prefix)/lib
+docdir=$(prefix)/share/doc/routino
+datadir=$(prefix)/share/routino
 
 
 # Library version for ABI compatibility
@@ -69,9 +60,7 @@ LIBVERSION=$(SOVERSION).0.0
 
 
 # Compilation programs
-CC=gcc
-CXX=g++
-LD=gcc
+LD=$(CXX)
 
 ifdef CLANG
   ifeq ($(CLANG),1)
@@ -82,10 +71,10 @@ ifdef CLANG
 endif
 
 # Maths library
-LDFLAGS=-lm
+LDFLAGS+=-lm
 
 # Language dialect selection
-CFLAGS=-std=c99
+CFLAGS+=-std=c99
 
 # Warning options
 CFLAGS+=-Wall -Wmissing-prototypes -Wextra -Wno-unused-parameter -pedantic
@@ -96,23 +85,9 @@ ifdef CLANG
   endif
 endif
 
-# Optimisation options
-CFLAGS+=-O3
-
-# Fast maths option - makes test cases fail slightly
-CFLAGS+=-ffast-math
-ifdef FASTMATHS
-  ifeq ($(FASTMATHS),0)
-    CFLAGS+=-fno-fast-math
-  endif
-endif
-
 # Optimisation option (only works if compilation and execution use exactly the same CPU architecture).
 #CFLAGS+=-march=native
 
-# Compile with debugging symbols
-CFLAGS+=-g
-
 # Option for compiling with sanitizer for debugging memory addresses and undefined behaviour
 ifdef SANITIZE
   ifeq ($(SANITIZE),1)
@@ -143,7 +118,7 @@ LDFLAGS_LDSO=-Wl,-R.
 
 # Required for multi-threaded support (comment these two lines out if not required)
 CFLAGS+=-pthread -DUSE_PTHREADS
-LDFLAGS+=-pthread -lpthread
+LDFLAGS+=-pthread
 
 
 # Required for bzip2 support (comment these two lines out if not required)
-- 
2.23.0

