changeset 22:a90992bc7331

Add compiler debug option to makefile
author Mike Pavone <pavone@retrodev.com>
date Sat, 14 Jul 2012 14:37:37 -0700
parents be6d1cf7b7d7
children 8435bf0360f8 582fdb18efaf
files Makefile
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Sat Jul 14 12:33:11 2012 -0700
+++ b/Makefile	Sat Jul 14 14:37:37 2012 -0700
@@ -5,6 +5,11 @@
 OBJS := $(addprefix $(OBJDIR)/,sim.tp.c lifter.tp.c)
 TPDIR := ../tabletprog
 TPC := $(TPDIR)/tpc.js
+TPFLAGS := 
+
+ifdef compilerdebug
+	TPFLAGS += -compilerdebug 
+endif
 
 all : $(BINS) $(OBJS)
 
@@ -12,7 +17,7 @@
 	gcc -ggdb -I$(TPDIR) -o $@ $< $(TPDIR)/runtime/object.c 
 
 $(OBJDIR)/%.tp.c : $(SRCDIR)/%.tp
-	d8 $(TPC) -- -basedir $(TPDIR)/ -i src $< > $@
+	d8 $(TPC) -- -basedir $(TPDIR)/ -i src $(TPFLAGS) $< > $@
 
 clean :
 	rm -f $(OBJS) $(BINS)