summaryrefslogtreecommitdiff
path: root/Makefile.mk
diff options
context:
space:
mode:
authorDamien Zammit <damien@zamaudio.com>2014-07-01 09:03:38 +1000
committerDamien Zammit <damien@zamaudio.com>2014-07-01 09:03:38 +1000
commit0d80fefbbb2eb72212cc890ceef2de601101b59b (patch)
treed6610f873798e32157fd802ea04cf8441dba8aca /Makefile.mk
parent0a3d9fc62236cfdb16993009262e8a31c82ac5a1 (diff)
Update DPF, some misc fixes #14
Diffstat (limited to 'Makefile.mk')
-rw-r--r--Makefile.mk31
1 files changed, 16 insertions, 15 deletions
diff --git a/Makefile.mk b/Makefile.mk
index 524ad21..37e9426 100644
--- a/Makefile.mk
+++ b/Makefile.mk
@@ -4,20 +4,9 @@
# Created by falkTX
#
-AR ?= ar
-RM ?= rm -f
CC ?= gcc
CXX ?= g++
-# No heavy optimisations
-OPTIMIZATIONS ?= -O2 -ffast-math
-
-# Heavy optimisations
-#OPTIMIZATIONS ?= -O2 -ffast-math -mtune=generic -msse -msse2 -mfpmath=sse
-
-# Raspberry Pi
-#OPTIMIZATIONS ?= -O2 -ffast-math -march=armv6 -mfpu=vfp -mfloat-abi=hard
-
# --------------------------------------------------------------
# Fallback to Linux if no other OS defined
@@ -32,9 +21,11 @@ endif
# --------------------------------------------------------------
# Common build and link flags
-
BASE_FLAGS = -Wall -Wextra -pipe
-BASE_OPTS = $(OPTIMIZATIONS) -fdata-sections -ffunction-sections
+BASE_OPTS = -O2 -ffast-math -fdata-sections -ffunction-sections
+ifneq ($(NOOPT),true)
+BASE_OPTS += -mtune=generic -msse -msse2 -mfpmath=sse
+endif
LINK_OPTS = -fdata-sections -ffunction-sections -Wl,-O1 -Wl,--as-needed -Wl,--gc-sections -Wl,--strip-all
ifeq ($(MACOS),true)
@@ -43,8 +34,11 @@ LINK_OPTS = -fdata-sections -ffunction-sections -Wl,-dead_strip -Wl,-dead_strip
endif
ifeq ($(RASPPI),true)
-# Raspberry-Pi optimization flags
-BASE_OPTS = $(OPTIMIZATIONS)
+# Raspberry-Pi flags
+BASE_OPTS = -O2 -ffast-math
+ifneq ($(NOOPT),true)
+BASE_OPTS += -march=armv6 -mfpu=vfp -mfloat-abi=hard
+endif
LINK_OPTS = -Wl,-O1 -Wl,--as-needed -Wl,--strip-all
endif
@@ -75,6 +69,9 @@ endif
# Check for required libs
ifeq ($(LINUX),true)
+ifneq ($(shell pkg-config --exists jack && echo true),true)
+$(error JACK missing, cannot continue)
+endif
ifneq ($(shell pkg-config --exists gl && echo true),true)
$(error OpenGL missing, cannot continue)
endif
@@ -83,6 +80,10 @@ $(error X11 missing, cannot continue)
endif
endif
+ifneq ($(shell pkg-config --exists liblo && echo true),true)
+$(error liblo missing, cannot continue)
+endif
+
# --------------------------------------------------------------
# Set libs stuff