xref: /rk3399_rockchip-uboot/tools/gdb/Makefile (revision d984fed068b3bec8a7edaf7a3de71479abde080a)
1d84c5581Swdenk#
2f9328639SMarian Balakowicz# (C) Copyright 2006
3f9328639SMarian Balakowicz# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4f9328639SMarian Balakowicz#
5d84c5581Swdenk# (C) Copyright 2000
6b3b0fd55SWolfgang Denk# Murray Jensen <Murray.Jensen@csiro.au>
7d84c5581Swdenk#
8d84c5581Swdenk# See file CREDITS for list of people who contributed to this
9d84c5581Swdenk# project.
10d84c5581Swdenk#
11d84c5581Swdenk# This program is free software; you can redistribute it and/or
12d84c5581Swdenk# modify it under the terms of the GNU General Public License as
13d84c5581Swdenk# published by the Free Software Foundation; either version 2 of
14d84c5581Swdenk# the License, or (at your option) any later version.
15d84c5581Swdenk#
16d84c5581Swdenk# This program is distributed in the hope that it will be useful,
17d84c5581Swdenk# but WITHOUT ANY WARRANTY; without even the implied warranty of
18d84c5581Swdenk# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19d84c5581Swdenk# GNU General Public License for more details.
20d84c5581Swdenk#
21d84c5581Swdenk# You should have received a copy of the GNU General Public License
22d84c5581Swdenk# along with this program; if not, write to the Free Software
23d84c5581Swdenk# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
24d84c5581Swdenk# MA 02111-1307 USA
25d84c5581Swdenk#
26d84c5581Swdenk
27d84c5581Swdenkinclude $(TOPDIR)/config.mk
28d84c5581Swdenk
29d84c5581SwdenkBINS	= gdbsend gdbcont
30d84c5581Swdenk
31f9328639SMarian BalakowiczCOBJS	= gdbsend.o gdbcont.o error.o remote.o serial.o
32f9328639SMarian Balakowicz
33*d984fed0SScott WoodHOSTOBJS := $(addprefix $(obj),$(COBJS))
34*d984fed0SScott WoodHOSTSRCS := $(COBJS:.o=.c)
35f9328639SMarian BalakowiczBINS	:= $(addprefix $(obj),$(BINS))
36d84c5581Swdenk
37d84c5581Swdenk#
38d84c5581Swdenk# Use native tools and options
39d84c5581Swdenk#
40*d984fed0SScott WoodHOSTCPPFLAGS = -I$(BFD_ROOT_DIR)/include
41d84c5581Swdenk
42d84c5581SwdenkHOSTOS := $(shell uname -s | sed -e 's/\([Cc][Yy][Gg][Ww][Ii][Nn]\).*/cygwin/')
43d84c5581Swdenk
44d84c5581Swdenkifeq ($(HOSTOS),cygwin)
45d84c5581Swdenk
46d84c5581Swdenkall:
47184f1b40SWolfgang Denk$(obj).depend:
48d84c5581Swdenk
49d84c5581Swdenkelse	# ! CYGWIN
50d84c5581Swdenk
51f9328639SMarian Balakowiczall:	$(obj).depend $(BINS)
52d84c5581Swdenk
53f9328639SMarian Balakowicz$(obj)gdbsend:	$(obj)gdbsend.o $(obj)error.o $(obj)remote.o $(obj)serial.o
54*d984fed0SScott Wood		$(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^
55d84c5581Swdenk
56f9328639SMarian Balakowicz$(obj)gdbcont:	$(obj)gdbcont.o $(obj)error.o $(obj)remote.o $(obj)serial.o
57*d984fed0SScott Wood		$(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^
58d84c5581Swdenk
59d84c5581Swdenkclean:
60*d984fed0SScott Wood	rm -f $(HOSTOBJS)
61d84c5581Swdenk
62d84c5581Swdenkdistclean:	clean
63f9328639SMarian Balakowicz	rm -f $(BINS) $(obj)core $(obj)*.bak $(obj).depend
64d84c5581Swdenk
65d84c5581Swdenk#########################################################################
66d84c5581Swdenk
67f9328639SMarian Balakowicz# defines $(obj).depend target
68f9328639SMarian Balakowiczinclude $(SRCTREE)/rules.mk
69d84c5581Swdenk
70f9328639SMarian Balakowiczsinclude $(obj).depend
71d84c5581Swdenk
72d84c5581Swdenk#########################################################################
73d84c5581Swdenk
74d84c5581Swdenkendif	# cygwin
75