Browse Source

From `man gcc`:

It makes a difference where in the command you write this option; the linker
searches and processes libraries and object files in the order they are
specified.  Thus, foo.o -lz bar.o searches library z after file foo.o but before
bar.o.  If bar.o refers to functions in z, those functions may not be loaded.
master
King Kévin 1 year ago
parent
commit
2c4772ce53
  1. 4
      Makefile

4
Makefile

@ -14,7 +14,7 @@ CFLAGS += -fno-common -ffunction-sections -fdata-sections @@ -14,7 +14,7 @@ CFLAGS += -fno-common -ffunction-sections -fdata-sections
all: u2_usb u2_bt
u2_usb: u2_usb.c
gcc ${CFLAGS} -lhidapi-libusb -o $@ $<
gcc ${CFLAGS} `pkg-config --cflags hidapi-libusb` -o $@ $< `pkg-config --libs hidapi-libusb`
u2_bt: u2_bt.c
gcc ${CFLAGS} `pkg-config --cflags dbus-1` `pkg-config --libs dbus-1` -o $@ $<
gcc ${CFLAGS} `pkg-config --cflags dbus-1` -o $@ $< `pkg-config --libs dbus-1`

Loading…
Cancel
Save