3 # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
6 # Murray Jensen <Murray.Jensen@csiro.au>
8 # SPDX-License-Identifier: GPL-2.0+
11 include $(TOPDIR)/config.mk
13 BINS = gdbsend gdbcont
15 COBJS = gdbsend.o gdbcont.o error.o remote.o serial.o
17 HOSTOBJS := $(addprefix $(obj),$(COBJS))
18 HOSTSRCS := $(COBJS:.o=.c)
19 BINS := $(addprefix $(obj),$(BINS))
22 # Use native tools and options
24 HOSTCPPFLAGS = -I$(BFD_ROOT_DIR)/include
26 HOSTOS := $(shell uname -s | sed -e 's/\([Cc][Yy][Gg][Ww][Ii][Nn]\).*/cygwin/')
28 ifeq ($(HOSTOS),cygwin)
35 all: $(obj).depend $(BINS)
37 $(obj)gdbsend: $(obj)gdbsend.o $(obj)error.o $(obj)remote.o $(obj)serial.o
38 $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^
40 $(obj)gdbcont: $(obj)gdbcont.o $(obj)error.o $(obj)remote.o $(obj)serial.o
41 $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^
47 rm -f $(BINS) $(obj)core $(obj)*.bak $(obj).depend
49 #########################################################################
51 # defines $(obj).depend target
52 include $(SRCTREE)/rules.mk
54 sinclude $(obj).depend
56 #########################################################################