blob: dd98fb65c0dccef2701d1bb877f055d0cda58c83 [file] [log] [blame]
wdenkd84c5582002-01-27 00:56:55 +00001#
Marian Balakowiczd62379d2006-09-01 19:49:50 +02002# (C) Copyright 2006
3# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4#
wdenkd84c5582002-01-27 00:56:55 +00005# (C) Copyright 2000
Wolfgang Denk2c9dfca2005-08-12 23:20:59 +02006# Murray Jensen <Murray.Jensen@csiro.au>
wdenkd84c5582002-01-27 00:56:55 +00007#
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02008# SPDX-License-Identifier: GPL-2.0+
wdenkd84c5582002-01-27 00:56:55 +00009#
10
11include $(TOPDIR)/config.mk
12
13BINS = gdbsend gdbcont
14
Marian Balakowiczd62379d2006-09-01 19:49:50 +020015COBJS = gdbsend.o gdbcont.o error.o remote.o serial.o
16
Scott Wood16c91a12009-11-04 18:41:41 -060017HOSTOBJS := $(addprefix $(obj),$(COBJS))
18HOSTSRCS := $(COBJS:.o=.c)
Marian Balakowiczd62379d2006-09-01 19:49:50 +020019BINS := $(addprefix $(obj),$(BINS))
wdenkd84c5582002-01-27 00:56:55 +000020
21#
22# Use native tools and options
23#
Scott Wood16c91a12009-11-04 18:41:41 -060024HOSTCPPFLAGS = -I$(BFD_ROOT_DIR)/include
wdenkd84c5582002-01-27 00:56:55 +000025
wdenkd84c5582002-01-27 00:56:55 +000026ifeq ($(HOSTOS),cygwin)
27
28all:
Wolfgang Denk809be8d2008-07-11 22:55:31 +020029$(obj).depend:
wdenkd84c5582002-01-27 00:56:55 +000030
31else # ! CYGWIN
32
Marian Balakowiczd62379d2006-09-01 19:49:50 +020033all: $(obj).depend $(BINS)
wdenkd84c5582002-01-27 00:56:55 +000034
Marian Balakowiczd62379d2006-09-01 19:49:50 +020035$(obj)gdbsend: $(obj)gdbsend.o $(obj)error.o $(obj)remote.o $(obj)serial.o
Scott Wood16c91a12009-11-04 18:41:41 -060036 $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^
wdenkd84c5582002-01-27 00:56:55 +000037
Marian Balakowiczd62379d2006-09-01 19:49:50 +020038$(obj)gdbcont: $(obj)gdbcont.o $(obj)error.o $(obj)remote.o $(obj)serial.o
Scott Wood16c91a12009-11-04 18:41:41 -060039 $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^
wdenkd84c5582002-01-27 00:56:55 +000040
wdenkd84c5582002-01-27 00:56:55 +000041clean:
Scott Wood16c91a12009-11-04 18:41:41 -060042 rm -f $(HOSTOBJS)
wdenkd84c5582002-01-27 00:56:55 +000043
44distclean: clean
Marian Balakowiczd62379d2006-09-01 19:49:50 +020045 rm -f $(BINS) $(obj)core $(obj)*.bak $(obj).depend
wdenkd84c5582002-01-27 00:56:55 +000046
47#########################################################################
48
Marian Balakowiczd62379d2006-09-01 19:49:50 +020049# defines $(obj).depend target
50include $(SRCTREE)/rules.mk
wdenkd84c5582002-01-27 00:56:55 +000051
Marian Balakowiczd62379d2006-09-01 19:49:50 +020052sinclude $(obj).depend
wdenkd84c5582002-01-27 00:56:55 +000053
54#########################################################################
55
56endif # cygwin