You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/media-plugins/ir_lv2/files/ir_lv2-1.3.4-respect-flags....

48 lines
2.1 KiB

--- a/Makefile
+++ b/Makefile
@@ -20,7 +20,7 @@ CC ?= gcc
CXX ?= g++
# change "-O2 -ffast-math" to "-g -O0" below if you want to debug the plugin
-CPPFLAGS += -Wall -I. -I/usr/include `pkg-config --cflags gtk+-2.0` `pkg-config --cflags gthread-2.0` -D__STDC_FORMAT_MACROS -O2 -ffast-math
+CPPFLAGS += -Wall -I. -I/usr/include `${PKG_CONFIG} --cflags gtk+-2.0` `${PKG_CONFIG} --cflags gthread-2.0` -D__STDC_FORMAT_MACROS -ffast-math
LIBS += -lc -lm -lzita-convolver -lsamplerate -lsndfile `pkg-config --libs gthread-2.0` `pkg-config --libs gtk+-2.0`
ifeq ($(shell pkg-config --atleast-version='2.16' gtk+-2.0; echo $$?), 1)
@@ -31,28 +31,28 @@ ifeq ($(shell pkg-config --atleast-version='2.20' gtk+-2.0; echo $$?), 0)
CPPFLAGS += -D_HAVE_GTK_ATLEAST_2_20
endif
-C4CFLAGS = -Wall -I. -I/usr/include `pkg-config --cflags gthread-2.0` -O2 -ffast-math
+C4CFLAGS = -Wall -I. -I/usr/include `${PKG_CONFIG} --cflags gthread-2.0` -ffast-math
C4LIBS = -lsndfile `pkg-config --libs gthread-2.0`
all: ir.so ir_gui.so
ir.o: ir.cc ir.h ir_utils.h
- $(CXX) ir.cc $(CPPFLAGS) -c -fPIC -o ir.o
+ $(CXX) ir.cc $(CPPFLAGS) -c -fPIC $(CFLAGS) -o ir.o
ir_gui.o: ir_gui.cc ir.h ir_utils.h ir_wavedisplay.h
- $(CXX) ir_gui.cc $(CPPFLAGS) -c -fPIC -o ir_gui.o
+ $(CXX) ir_gui.cc $(CPPFLAGS) -c -fPIC $(CFLAGS) -o ir_gui.o
ir_utils.o: ir_utils.cc ir_utils.h ir.h
- $(CXX) ir_utils.cc $(CPPFLAGS) -c -fPIC -o ir_utils.o
+ $(CXX) ir_utils.cc $(CPPFLAGS) -c -fPIC $(CFLAGS) -o ir_utils.o
ir_meter.o: ir_meter.cc ir_meter.h ir.h ir_utils.h
- $(CXX) ir_meter.cc $(CPPFLAGS) -c -fPIC -o ir_meter.o
+ $(CXX) ir_meter.cc $(CPPFLAGS) -c -fPIC $(CFLAGS) -o ir_meter.o
ir_modeind.o: ir_modeind.cc ir_modeind.h ir.h ir_utils.h
- $(CXX) ir_modeind.cc $(CPPFLAGS) -c -fPIC -o ir_modeind.o
+ $(CXX) ir_modeind.cc $(CPPFLAGS) -c -fPIC $(CFLAGS) -o ir_modeind.o
ir_wavedisplay.o: ir_wavedisplay.cc ir_wavedisplay.h ir.h ir_utils.h
- $(CXX) ir_wavedisplay.cc $(CPPFLAGS) -c -fPIC -o ir_wavedisplay.o
+ $(CXX) ir_wavedisplay.cc $(CPPFLAGS) -c -fPIC $(CFLAGS) -o ir_wavedisplay.o
ir.so: ir.o ir_utils.o
$(CXX) $(LDFLAGS) ir.o ir_utils.o $(LIBS) -shared -o ir.so