xref: /openbmc/u-boot/tools/gdb/Makefile (revision e2e1f3ca)
1#
2# (C) Copyright 2006
3# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4#
5# (C) Copyright 2000
6# Murray Jensen <Murray.Jensen@csiro.au>
7#
8# SPDX-License-Identifier:	GPL-2.0+
9#
10
11include $(TOPDIR)/config.mk
12
13BINS	= gdbsend gdbcont
14
15COBJS	= gdbsend.o gdbcont.o error.o remote.o serial.o
16
17HOSTOBJS := $(addprefix $(obj),$(COBJS))
18HOSTSRCS := $(COBJS:.o=.c)
19BINS	:= $(addprefix $(obj),$(BINS))
20
21#
22# Use native tools and options
23#
24HOSTCPPFLAGS = -I$(BFD_ROOT_DIR)/include
25
26ifeq ($(HOSTOS),cygwin)
27
28all:
29$(obj).depend:
30
31else	# ! CYGWIN
32
33all:	$(obj).depend $(BINS)
34
35$(obj)gdbsend:	$(obj)gdbsend.o $(obj)error.o $(obj)remote.o $(obj)serial.o
36		$(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^
37
38$(obj)gdbcont:	$(obj)gdbcont.o $(obj)error.o $(obj)remote.o $(obj)serial.o
39		$(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^
40
41clean:
42	rm -f $(HOSTOBJS)
43
44distclean:	clean
45	rm -f $(BINS) $(obj)core $(obj)*.bak $(obj).depend
46
47#########################################################################
48
49# defines $(obj).depend target
50include $(SRCTREE)/rules.mk
51
52sinclude $(obj).depend
53
54#########################################################################
55
56endif	# cygwin
57