wdenk | d84c558 | 2002-01-27 00:56:55 +0000 | [diff] [blame] | 1 | # |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 2 | # (C) Copyright 2006 |
3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | ||||
4 | # | ||||
wdenk | d84c558 | 2002-01-27 00:56:55 +0000 | [diff] [blame] | 5 | # (C) Copyright 2000 |
Wolfgang Denk | b3b0fd5 | 2005-08-12 23:20:59 +0200 | [diff] [blame] | 6 | # Murray Jensen <Murray.Jensen@csiro.au> |
wdenk | d84c558 | 2002-01-27 00:56:55 +0000 | [diff] [blame] | 7 | # |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 8 | # SPDX-License-Identifier: GPL-2.0+ |
wdenk | d84c558 | 2002-01-27 00:56:55 +0000 | [diff] [blame] | 9 | # |
10 | |||||
11 | include $(TOPDIR)/config.mk | ||||
12 | |||||
13 | BINS = gdbsend gdbcont | ||||
14 | |||||
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 15 | COBJS = gdbsend.o gdbcont.o error.o remote.o serial.o |
16 | |||||
Scott Wood | d984fed | 2009-11-04 18:41:41 -0600 | [diff] [blame] | 17 | HOSTOBJS := $(addprefix $(obj),$(COBJS)) |
18 | HOSTSRCS := $(COBJS:.o=.c) | ||||
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 19 | BINS := $(addprefix $(obj),$(BINS)) |
wdenk | d84c558 | 2002-01-27 00:56:55 +0000 | [diff] [blame] | 20 | |
21 | # | ||||
22 | # Use native tools and options | ||||
23 | # | ||||
Scott Wood | d984fed | 2009-11-04 18:41:41 -0600 | [diff] [blame] | 24 | HOSTCPPFLAGS = -I$(BFD_ROOT_DIR)/include |
wdenk | d84c558 | 2002-01-27 00:56:55 +0000 | [diff] [blame] | 25 | |
wdenk | d84c558 | 2002-01-27 00:56:55 +0000 | [diff] [blame] | 26 | ifeq ($(HOSTOS),cygwin) |
27 | |||||
28 | all: | ||||
Wolfgang Denk | 184f1b4 | 2008-07-11 22:55:31 +0200 | [diff] [blame] | 29 | $(obj).depend: |
wdenk | d84c558 | 2002-01-27 00:56:55 +0000 | [diff] [blame] | 30 | |
31 | else # ! CYGWIN | ||||
32 | |||||
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 33 | all: $(obj).depend $(BINS) |
wdenk | d84c558 | 2002-01-27 00:56:55 +0000 | [diff] [blame] | 34 | |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 35 | $(obj)gdbsend: $(obj)gdbsend.o $(obj)error.o $(obj)remote.o $(obj)serial.o |
Scott Wood | d984fed | 2009-11-04 18:41:41 -0600 | [diff] [blame] | 36 | $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^ |
wdenk | d84c558 | 2002-01-27 00:56:55 +0000 | [diff] [blame] | 37 | |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 38 | $(obj)gdbcont: $(obj)gdbcont.o $(obj)error.o $(obj)remote.o $(obj)serial.o |
Scott Wood | d984fed | 2009-11-04 18:41:41 -0600 | [diff] [blame] | 39 | $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^ |
wdenk | d84c558 | 2002-01-27 00:56:55 +0000 | [diff] [blame] | 40 | |
wdenk | d84c558 | 2002-01-27 00:56:55 +0000 | [diff] [blame] | 41 | clean: |
Scott Wood | d984fed | 2009-11-04 18:41:41 -0600 | [diff] [blame] | 42 | rm -f $(HOSTOBJS) |
wdenk | d84c558 | 2002-01-27 00:56:55 +0000 | [diff] [blame] | 43 | |
44 | distclean: clean | ||||
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 45 | rm -f $(BINS) $(obj)core $(obj)*.bak $(obj).depend |
wdenk | d84c558 | 2002-01-27 00:56:55 +0000 | [diff] [blame] | 46 | |
47 | ######################################################################### | ||||
48 | |||||
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 49 | # defines $(obj).depend target |
50 | include $(SRCTREE)/rules.mk | ||||
wdenk | d84c558 | 2002-01-27 00:56:55 +0000 | [diff] [blame] | 51 | |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 52 | sinclude $(obj).depend |
wdenk | d84c558 | 2002-01-27 00:56:55 +0000 | [diff] [blame] | 53 | |
54 | ######################################################################### | ||||
55 | |||||
56 | endif # cygwin |