Commit cecbbd90 authored by Lubomir Rintel's avatar Lubomir Rintel 🥕

Allow overriding compiler flags

-g and -O flags should not be forced upon the user. Distributions often prefer
different flags: -O0 prevents compiler from generating information useful for
security features, such as -D_FORTIFY_SOURCE=2.

Libusb flags are made overridable as well, so that users can choose alternate
libusb installation or maybe a fork such as libusbx.
parent d776c08f
......@@ -12,8 +12,12 @@ UDEV_RULES_DIR=$(DESTDIR)/usr/lib/udev/rules.d/
override CFLAGS += `pkg-config --cflags libusb-1.0` -g -O0
LIBS = `pkg-config --libs libusb-1.0`
libusb_CFLAGS = `pkg-config --cflags libusb-1.0`
libusb_LIBS = `pkg-config --libs libusb-1.0`
CFLAGS = -g -O0
override CFLAGS += $(libusb_CFLAGS)
override LIBS += $(libusb_LIBS)
all: $(OBJECTS) $(PROGS)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment