summaryrefslogtreecommitdiff
path: root/tools/gdb/Makefile
blob: dd98fb65c0dccef2701d1bb877f055d0cda58c83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#
# (C) Copyright 2006
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
#
# (C) Copyright 2000
# Murray Jensen <Murray.Jensen@csiro.au>
#
# 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))

#
# 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

#########################################################################

# defines $(obj).depend target
include $(SRCTREE)/rules.mk

sinclude $(obj).depend

#########################################################################

endif	# cygwin