sh: Generate a map file for debugging
authorAlan Cox <alan@linux.intel.com>
Sat, 6 Jun 2015 21:54:50 +0000 (22:54 +0100)
committerAlan Cox <alan@linux.intel.com>
Sat, 6 Jun 2015 21:54:50 +0000 (22:54 +0100)
Applications/V7/cmd/sh/Makefile.6809

index 2b32ae0..83b96dc 100644 (file)
@@ -4,11 +4,11 @@ CC = m6809-unknown-gcc
 ASM = m6809-unknown-as
 AR = m6809-unknown-ar
 LINKER = lwlink
-CFLAGS =  -I../../../../Library/include -I../../../../Library/include/6502
+CFLAGS =  -I../../../../Library/include -I../../../../Library/include/6502 -Wall -pedantic -fno-strict-aliasing
 COPT = -Os
 LINKER_OPT = --format=raw -L../../../../Library/libs -lc6809
 LIBGCCDIR = $(dir $(shell $(CC) -print-libgcc-file-name))
-LINKER_OPT += -L$(LIBGCCDIR) -lgcc
+LINKER_OPT += -L$(LIBGCCDIR) -lgcc -m sh.map
 LINKER_OPT += --script=../../../util/$(TARGET).link
 ASM_OPT = -o
 CRT0 = ../../../../Library/libs/crt0_6809.o
@@ -20,6 +20,8 @@ SRCS  = args.c blok.c builtin.c cmd.c ctype.c error.c expand.c fault.c io.c \
         macro.c main.c msg.c name.c print.c service.c setbrk.c stak.c \
         string.c xec.c glob.c
 
+INCS  = brkincr.h ctype.h defs.h mac.h mode.h name.h stak.h sym.h timeout.h
+
 # Workaround for gcc 6809
 SRCS_HARD = word.c
 
@@ -29,7 +31,7 @@ OBJS_HARD = $(SRCS_HARD:.c=.o)
 
 all: sh
 
-$(OBJS): $(SRCS)
+$(OBJS): $(INCS)
 
 $(OBJS): %.o : %.c
        $(CC) -c $(CFLAGS) $(COPT) $<