Mercurial > repos > icfp2012
view Makefile @ 22:a90992bc7331
Add compiler debug option to makefile
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Sat, 14 Jul 2012 14:37:37 -0700 |
parents | 50a456168c25 |
children | 2dc785f67327 |
line wrap: on
line source
OUTDIR := bin OBJDIR := build SRCDIR := src BINS := $(addprefix $(OUTDIR)/,sim lifter) OBJS := $(addprefix $(OBJDIR)/,sim.tp.c lifter.tp.c) TPDIR := ../tabletprog TPC := $(TPDIR)/tpc.js TPFLAGS := ifdef compilerdebug TPFLAGS += -compilerdebug endif all : $(BINS) $(OBJS) $(OUTDIR)/% : $(OBJDIR)/%.tp.c gcc -ggdb -I$(TPDIR) -o $@ $< $(TPDIR)/runtime/object.c $(OBJDIR)/%.tp.c : $(SRCDIR)/%.tp d8 $(TPC) -- -basedir $(TPDIR)/ -i src $(TPFLAGS) $< > $@ clean : rm -f $(OBJS) $(BINS) cleansim : rm -f bin/sim build/sim.tp.c cleanlift : rm -f bin/lifter build/lifter.tp.c