1d84c5581Swdenk# 2f9328639SMarian Balakowicz# (C) Copyright 2006 3f9328639SMarian Balakowicz# Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4f9328639SMarian Balakowicz# 5d84c5581Swdenk# (C) Copyright 2000 6b3b0fd55SWolfgang Denk# Murray Jensen <Murray.Jensen@csiro.au> 7d84c5581Swdenk# 8d84c5581Swdenk# See file CREDITS for list of people who contributed to this 9d84c5581Swdenk# project. 10d84c5581Swdenk# 11d84c5581Swdenk# This program is free software; you can redistribute it and/or 12d84c5581Swdenk# modify it under the terms of the GNU General Public License as 13d84c5581Swdenk# published by the Free Software Foundation; either version 2 of 14d84c5581Swdenk# the License, or (at your option) any later version. 15d84c5581Swdenk# 16d84c5581Swdenk# This program is distributed in the hope that it will be useful, 17d84c5581Swdenk# but WITHOUT ANY WARRANTY; without even the implied warranty of 18d84c5581Swdenk# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19d84c5581Swdenk# GNU General Public License for more details. 20d84c5581Swdenk# 21d84c5581Swdenk# You should have received a copy of the GNU General Public License 22d84c5581Swdenk# along with this program; if not, write to the Free Software 23d84c5581Swdenk# Foundation, Inc., 59 Temple Place, Suite 330, Boston, 24d84c5581Swdenk# MA 02111-1307 USA 25d84c5581Swdenk# 26d84c5581Swdenk 27d84c5581Swdenkinclude $(TOPDIR)/config.mk 28d84c5581Swdenk 29d84c5581SwdenkBINS = gdbsend gdbcont 30d84c5581Swdenk 31f9328639SMarian BalakowiczCOBJS = gdbsend.o gdbcont.o error.o remote.o serial.o 32f9328639SMarian Balakowicz 33f9328639SMarian BalakowiczOBJS := $(addprefix $(obj),$(COBJS)) 34f9328639SMarian BalakowiczSRCS := $(COBJS:.o=.c) 35f9328639SMarian BalakowiczBINS := $(addprefix $(obj),$(BINS)) 36d84c5581Swdenk 37d84c5581Swdenk# 38d84c5581Swdenk# Use native tools and options 39d84c5581Swdenk# 40d84c5581SwdenkCPPFLAGS = -I$(BFD_ROOT_DIR)/include 41d84c5581SwdenkCFLAGS = $(HOST_CFLAGS) -O $(CPPFLAGS) 42d84c5581SwdenkCC = $(HOSTCC) 43d84c5581SwdenkMAKEDEPEND = makedepend 44d84c5581Swdenk 45d84c5581SwdenkHOSTOS := $(shell uname -s | sed -e 's/\([Cc][Yy][Gg][Ww][Ii][Nn]\).*/cygwin/') 46d84c5581Swdenk 47d84c5581Swdenkifeq ($(HOSTOS),cygwin) 48d84c5581Swdenk 49d84c5581Swdenkall: 50*184f1b40SWolfgang Denk$(obj).depend: 51d84c5581Swdenk 52d84c5581Swdenkelse # ! CYGWIN 53d84c5581Swdenk 54f9328639SMarian Balakowiczall: $(obj).depend $(BINS) 55d84c5581Swdenk 56f9328639SMarian Balakowicz$(obj)gdbsend: $(obj)gdbsend.o $(obj)error.o $(obj)remote.o $(obj)serial.o 57d84c5581Swdenk $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^ 58d84c5581Swdenk 59f9328639SMarian Balakowicz$(obj)gdbcont: $(obj)gdbcont.o $(obj)error.o $(obj)remote.o $(obj)serial.o 60d84c5581Swdenk $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^ 61d84c5581Swdenk 62d84c5581Swdenkclean: 63d84c5581Swdenk rm -f $(OBJS) 64d84c5581Swdenk 65d84c5581Swdenkdistclean: clean 66f9328639SMarian Balakowicz rm -f $(BINS) $(obj)core $(obj)*.bak $(obj).depend 67d84c5581Swdenk 68d84c5581Swdenk######################################################################### 69d84c5581Swdenk 70f9328639SMarian Balakowicz# defines $(obj).depend target 71f9328639SMarian Balakowiczinclude $(SRCTREE)/rules.mk 72d84c5581Swdenk 73f9328639SMarian Balakowiczsinclude $(obj).depend 74d84c5581Swdenk 75d84c5581Swdenk######################################################################### 76d84c5581Swdenk 77d84c5581Swdenkendif # cygwin 78