diff options
Diffstat (limited to 'tools/gdb')
-rw-r--r-- | tools/gdb/Makefile | 43 |
1 files changed, 6 insertions, 37 deletions
diff --git a/tools/gdb/Makefile b/tools/gdb/Makefile index dd98fb65c0..850bb9b20e 100644 --- a/tools/gdb/Makefile +++ b/tools/gdb/Makefile @@ -8,49 +8,18 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -BINS = gdbsend gdbcont - -COBJS = gdbsend.o gdbcont.o error.o remote.o serial.o - -HOSTOBJS := $(addprefix $(obj),$(COBJS)) -HOSTSRCS := $(COBJS:.o=.c) -BINS := $(addprefix $(obj),$(BINS)) +ifneq ($(HOSTOS),cygwin) # # Use native tools and options # -HOSTCPPFLAGS = -I$(BFD_ROOT_DIR)/include - -ifeq ($(HOSTOS),cygwin) - -all: -$(obj).depend: - -else # ! CYGWIN - -all: $(obj).depend $(BINS) - -$(obj)gdbsend: $(obj)gdbsend.o $(obj)error.o $(obj)remote.o $(obj)serial.o - $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^ - -$(obj)gdbcont: $(obj)gdbcont.o $(obj)error.o $(obj)remote.o $(obj)serial.o - $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^ - -clean: - rm -f $(HOSTOBJS) - -distclean: clean - rm -f $(BINS) $(obj)core $(obj)*.bak $(obj).depend - -######################################################################### +HOST_EXTRACFLAGS := -I$(BFD_ROOT_DIR)/include -pedantic -# defines $(obj).depend target -include $(SRCTREE)/rules.mk +hostprogs-y := gdbsend gdbcont -sinclude $(obj).depend +gdbsend-objs := gdbsend.o error.o remote.o serial.o +gdbcont-objs := gdbcont.o error.o remote.o serial.o -######################################################################### +always := $(hostprogs-y) endif # cygwin |