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