view Makefile @ 28:7a274d6026c8

Use built-in true and false.
author Mike Pavone <pavone@retrodev.com>
date Sat, 14 Jul 2012 19:33:35 -0700
parents a90992bc7331
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