]> git.ipfire.org Git - people/ms/u-boot.git/blob - tools/gdb/Makefile
Add GPL-2.0+ SPDX-License-Identifier to source files
[people/ms/u-boot.git] / tools / gdb / Makefile
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
11 include $(TOPDIR)/config.mk
12
13 BINS = gdbsend gdbcont
14
15 COBJS = gdbsend.o gdbcont.o error.o remote.o serial.o
16
17 HOSTOBJS := $(addprefix $(obj),$(COBJS))
18 HOSTSRCS := $(COBJS:.o=.c)
19 BINS := $(addprefix $(obj),$(BINS))
20
21 #
22 # Use native tools and options
23 #
24 HOSTCPPFLAGS = -I$(BFD_ROOT_DIR)/include
25
26 HOSTOS := $(shell uname -s | sed -e 's/\([Cc][Yy][Gg][Ww][Ii][Nn]\).*/cygwin/')
27
28 ifeq ($(HOSTOS),cygwin)
29
30 all:
31 $(obj).depend:
32
33 else # ! CYGWIN
34
35 all: $(obj).depend $(BINS)
36
37 $(obj)gdbsend: $(obj)gdbsend.o $(obj)error.o $(obj)remote.o $(obj)serial.o
38 $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^
39
40 $(obj)gdbcont: $(obj)gdbcont.o $(obj)error.o $(obj)remote.o $(obj)serial.o
41 $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^
42
43 clean:
44 rm -f $(HOSTOBJS)
45
46 distclean: clean
47 rm -f $(BINS) $(obj)core $(obj)*.bak $(obj).depend
48
49 #########################################################################
50
51 # defines $(obj).depend target
52 include $(SRCTREE)/rules.mk
53
54 sinclude $(obj).depend
55
56 #########################################################################
57
58 endif # cygwin