File:  [gforth] / gforth / vmgen-ex / Makefile
Revision 1.4: download - view: text, annotated - select for diffs
Tue May 1 10:20:55 2001 UTC (21 years, 2 months ago) by anton
Branches: MAIN
CVS tags: HEAD
fixed profiling
completed README

    1: #Makefile for vmgen example
    2: 
    3: #Copyright (C) 2001 Free Software Foundation, Inc.
    4: 
    5: #This file is part of Gforth.
    6: 
    7: #Gforth is free software; you can redistribute it and/or
    8: #modify it under the terms of the GNU General Public License
    9: #as published by the Free Software Foundation; either version 2
   10: #of the License, or (at your option) any later version.
   11: 
   12: #This program is distributed in the hope that it will be useful,
   13: #but WITHOUT ANY WARRANTY; without even the implied warranty of
   14: #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.#See the
   15: #GNU General Public License for more details.
   16: 
   17: #You should have received a copy of the GNU General Public License
   18: #along with this program; if not, write to the Free Software
   19: #Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
   20: 
   21: LEX=flex -l
   22: YACC=bison
   23: #YACC=yacc
   24: VMGEN=vmgen
   25: #GCC=gcc -g -Wall
   26: GCC=gcc -O3 -fomit-frame-pointer -Wall
   27: CC=$(GCC)
   28: 
   29: mini: mini.tab.o support.o peephole.o profile.o disasm.o engine.o engine-debug.o
   30: 	$(CC) $^ -o $@
   31: 
   32: lex.yy.c: mini.l
   33: 	$(LEX) mini.l
   34: 
   35: mini.tab.c: mini.y
   36: 	$(YACC) -b mini mini.y
   37: 
   38: mini-vm.i mini-disasm.i mini-gen.i mini-labels.i mini-profile.i mini-peephole.i: mini.vmg
   39: 	$(VMGEN) mini.vmg
   40: 
   41: mini.vmg: mini-inst.vmg mini-super.vmg
   42: 	m4 -s $< >$@
   43: 
   44: mini.tab.o: mini.tab.c mini-gen.i lex.yy.c mini.h
   45: 
   46: support.o: support.c mini.h
   47: 
   48: peephole.o: peephole.c mini-peephole.i mini.h
   49: 
   50: profile.o: profile.c mini-profile.i mini.h
   51: 
   52: disasm.o: disasm.c mini-disasm.i mini.h
   53: 
   54: engine.o: engine.c mini-vm.i mini-labels.i mini.h
   55: 
   56: engine-debug.o: engine.c mini-vm.i mini-labels.i mini.h
   57: 	$(GCC) -DVM_DEBUG -DVM_PROFILING -Dengine=engine_debug -c -o $@ $<
   58: 
   59: clean:
   60: 	rm -f *.o mini mini-*.i lex.yy.c mini.tab.c mini.vmg
   61: 
   62: check:  mini
   63: 	./mini test.mini|diff - test.out
   64: 
   65: #make profiles
   66: %.prof: %.mini mini
   67: 	./mini -p $< 2>$@

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>