xref: /openbmc/u-boot/tools/gdb/Makefile (revision 1b965432)
1# SPDX-License-Identifier: GPL-2.0+
2#
3# (C) Copyright 2006
4# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5#
6# (C) Copyright 2000
7# Murray Jensen <Murray.Jensen@csiro.au>
8
9ifneq ($(HOSTOS),cygwin)
10
11# Location of a usable BFD library, where we define "usable" as
12# "built for ${HOST}, supports ${TARGET}".  Sensible values are
13# - When cross-compiling: the root of the cross-environment
14# - Linux/ppc (native): /usr
15# - NetBSD/ppc (native): you lose ... (must extract these from the
16#   binutils build directory, plus the native and U-Boot include
17#   files don't like each other)
18
19ifeq ($(HOSTOS),darwin)
20BFD_ROOT_DIR =		/usr/local/tools
21else
22ifeq ($(HOSTARCH),$(ARCH))
23# native
24BFD_ROOT_DIR =		/usr
25else
26#BFD_ROOT_DIR =		/LinuxPPC/CDK		# Linux/i386
27#BFD_ROOT_DIR =		/usr/pkg/cross		# NetBSD/i386
28BFD_ROOT_DIR =		/opt/powerpc
29endif
30endif
31
32#
33# Use native tools and options
34#
35HOST_EXTRACFLAGS := -I$(BFD_ROOT_DIR)/include -pedantic
36
37hostprogs-y := gdbsend gdbcont
38
39gdbsend-objs := gdbsend.o error.o remote.o serial.o
40gdbcont-objs := gdbcont.o error.o remote.o serial.o
41
42always := $(hostprogs-y)
43
44endif	# cygwin
45