1## ----------------------------------------------------------------------- 2## 3## Copyright 2001-2008 H. Peter Anvin - All Rights Reserved 4## 5## This program is free software; you can redistribute it and/or modify 6## it under the terms of the GNU General Public License as published by 7## the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 8## Boston MA 02110-1301, USA; either version 2 of the License, or 9## (at your option) any later version; incorporated herein by reference. 10## 11## ----------------------------------------------------------------------- 12 13## 14## GDB remote debugging 15## 16 17topdir = ../.. 18MAKEDIR = $(topdir)/mk 19include $(MAKEDIR)/com32.mk 20 21CFLAGS += -fPIE 22 23LIBS = ../libutil/libutil_com.a ../lib/libcom32.a $(LIBGCC) 24LNXLIBS = ../libutil/libutil_lnx.a 25 26MODULES = gdbstub.c32 27TESTFILES = 28 29OBJS = main.o int.o serial.o gdbstub.o 30 31all: $(MODULES) $(TESTFILES) 32 33gdbstub.elf : $(OBJS) $(LIBS) $(C_LIBS) 34 $(LD) $(LDFLAGS) -o $@ $^ 35 36tidy dist clean: 37 rm -f *.o *.lo *.a *.lst *.elf .*.d *.tmp 38 39clean: tidy 40 rm -f *.lnx 41 42spotless: clean 43 rm -f *.lss *.c32 *.com 44 rm -f *~ \#* 45 46install: 47 mkdir -m 755 -p $(INSTALLROOT)$(AUXDIR) 48 install -m 644 $(MODULES) $(INSTALLROOT)$(AUXDIR) 49 50-include .*.d 51