Browse Source

add EXTRA_* compiler/linker/optimization flags. default to athlon-fx CPU architecture.

pull/1639/head
bsp2 7 years ago
parent
commit
52f8c50096
3 changed files with 45 additions and 11 deletions
  1. +11
    -5
      dep/yac/install_linux.mk
  2. +0
    -4
      other/vst2_lglw_debug_plugin/makefile.linux
  3. +34
    -2
      setenv_linux.sh

+ 11
- 5
dep/yac/install_linux.mk View File

@@ -5,8 +5,13 @@

# n=32bit build ("x86", jit)
# y=64bit build ("amd64", no jit)
ifeq ($(BUILD_64),)
BUILD_64=y
endif

ifeq ($(BUILD_ARM),)
BUILD_ARM=n
endif

MK=linux

@@ -122,13 +127,13 @@ endif
#
# C compiler flags
#
CFLAGS= -Wall
CFLAGS= -Wall $(EXTRA_CFLAGS)


#
# C++ compiler flags
#
CPPFLAGS= -Wall
CPPFLAGS= -Wall $(EXTRA_CPPFLAGS)


#
@@ -166,7 +171,7 @@ endif
#
# Linker flags
#
LDFLAGS=
LDFLAGS= $(EXTRA_LDFLAGS)


#
@@ -238,8 +243,9 @@ HAVE_HYPOTF=y
# Which flags to use for plugins
#
# "hack" for VSVR build (pffft lib requires SSE)
#OPTFLAGS+=-mtune=core2
OPTFLAGS+=-march=haswell
#OPTFLAGS+= -mtune=core2
#OPTFLAGS+= -march=haswell
OPTFLAGS+= $(EXTRA_OPTFLAGS)

#OPTFLAGS_PLUGIN = $(OPTFLAGS_SIZE)
OPTFLAGS_PLUGIN = $(OPTFLAGS)


+ 0
- 4
other/vst2_lglw_debug_plugin/makefile.linux View File

@@ -8,10 +8,6 @@ ALL_OBJ= \
$(VSVR_BASE_DIR)/dep/lglw/lglw_linux.o

EXTRAFLAGS+=-I"$(VST2_SDK_DIR)" -I"$(VSVR_BASE_DIR)/dep/lglw/"
EXTRAFLAGS+= -march=haswell
EXTRAFLAGS+= -fPIC

EXTRALIBS+= -march=haswell -fPIC
EXTRALIBS+= -lGL -ldl

.PHONY: clean


+ 34
- 2
setenv_linux.sh View File

@@ -1,10 +1,42 @@

export VSVR_BASE_DIR=`pwd`

# y=64 bit build
# n=32 bit build
export BUILD_64=y

# y=cross compile for ARM target (untested in VSVR build)
export BUILD_ARM=n


# CPU architecture
#CPU_ARCH=haswell
CPU_ARCH=athlon-fx

if [ "${USER}" = "bsp" ]; then
CPU_ARCH=haswell
fi

if [ "${USER}" = "cameron" ]; then
CPU_ARCH=haswell
fi

# Extra C compiler flags
export EXTRA_CFLAGS=-march=${CPU_ARCH}

# Extra C++ compiler flags
export EXTRA_CPPFLAGS=-march=${CPU_ARCH}

# Extra optimization flags (C/C++)
export EXTRA_OPTFLAGS=

# Extra linker flags
export EXTRA_LDFLAGS=-march=${CPU_ARCH}

# this must point to the directory which contains the 'aeffect.h' and 'aeffectx.h' files
export VST2_SDK_DIR=/mnt/dev/vstsdk2.4/pluginterfaces/vst2.x/

# 'n' = build the plugin w/o 3rd party modules
# n = build the plugin w/o 3rd party modules (only useful for debugging purposes)
# y = statically link 3rd party modules
#export RACK_STATIC_MODULES=y
export RACK_STATIC_MODULES=n


Loading…
Cancel
Save