X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=gdbserver%2FMakefile;h=85b0ac1d67b6f87d77bb54b4485558dc1398ab8d;hb=13c0da3bccf358150e11eab21d28d618db5ab25f;hp=e9d2774f35b7f6826f0fd4e4c5be35113820ee8f;hpb=1d8b0c600b3a96ded8b649adb81511aa6eeb47d2;p=fw%2Fstlink diff --git a/gdbserver/Makefile b/gdbserver/Makefile index e9d2774..85b0ac1 100644 --- a/gdbserver/Makefile +++ b/gdbserver/Makefile @@ -1,13 +1,24 @@ +# make ... for both libusb and libsg +# +# make CONFIG_USE_LIBSG=0 ... +# for just libusb +# PRG := st-util OBJS = gdb-remote.o gdb-server.o CFLAGS+=-g -Wall -Werror -std=gnu99 -I../src -CFLAGS+=-DCONFIG_USE_LIBUSB -CFLAGS+=-DCONFIG_USE_LIBSG -LIBS := -lstlink -lusb-1.0 -lsgutils2 -LDFLAGS+=$(LIBS) -L.. +CFLAGS+=-DCONFIG_USE_LIBUSB=1 +CFLAGS+=-DCONFIG_USE_LIBSG=$(CONFIG_USE_LIBSG) +LDFLAGS=-L.. -lstlink -lusb-1.0 +ifeq ($(CONFIG_USE_LIBSG),) +CONFIG_USE_LIBSG=1 +endif + +ifneq ($(CONFIG_USE_LIBSG),0) +LDFLAGS+=-lsgutils2 +endif all: $(PRG)