Annotation of gforth/vmgen-ex/Makefile, revision 1.12

1.1       anton       1: #Makefile for vmgen example
                      2: 
1.10      anton       3: #Copyright (C) 2001,2003 Free Software Foundation, Inc.
1.1       anton       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
1.12    ! anton       9: #as published by the Free Software Foundation, either version 3
1.1       anton      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
1.12    ! anton      18: #along with this program; if not, see http://www.gnu.org/licenses/.
1.1       anton      19: 
                     20: LEX=flex -l
1.11      anton      21: YACC=bison -y
1.1       anton      22: #YACC=yacc
                     23: VMGEN=vmgen
1.4       anton      24: #GCC=gcc -g -Wall
1.3       anton      25: GCC=gcc -O3 -fomit-frame-pointer -Wall
1.1       anton      26: CC=$(GCC)
1.8       anton      27: #M4=m4 -s #recommended if supported
                     28: M4=m4
1.6       anton      29: OBJECTS_MINI=mini.tab.o support.o peephole.o profile.o disasm.o engine.o engine-debug.o
1.1       anton      30: 
1.6       anton      31: mini: $(OBJECTS_MINI)
                     32:        $(CC) $(OBJECTS_MINI) -o $@
1.1       anton      33: 
                     34: lex.yy.c: mini.l
                     35:        $(LEX) mini.l
                     36: 
                     37: mini.tab.c: mini.y
1.11      anton      38:        $(YACC) mini.y && mv y.tab.c $@
1.1       anton      39: 
                     40: mini-vm.i mini-disasm.i mini-gen.i mini-labels.i mini-profile.i mini-peephole.i: mini.vmg
                     41:        $(VMGEN) mini.vmg
                     42: 
1.4       anton      43: mini.vmg: mini-inst.vmg mini-super.vmg
1.8       anton      44:        $(M4) mini-inst.vmg >$@
1.4       anton      45: 
1.1       anton      46: mini.tab.o: mini.tab.c mini-gen.i lex.yy.c mini.h
                     47: 
                     48: support.o: support.c mini.h
                     49: 
                     50: peephole.o: peephole.c mini-peephole.i mini.h
                     51: 
                     52: profile.o: profile.c mini-profile.i mini.h
                     53: 
                     54: disasm.o: disasm.c mini-disasm.i mini.h
                     55: 
                     56: engine.o: engine.c mini-vm.i mini-labels.i mini.h
                     57: 
                     58: engine-debug.o: engine.c mini-vm.i mini-labels.i mini.h
1.9       anton      59:        $(CC) -DVM_DEBUG -DVM_PROFILING -Dengine=engine_debug -c -o $@ engine.c
1.1       anton      60: 
                     61: clean:
1.5       anton      62:        rm -f *.o mini mini-*.i lex.yy.c mini.tab.c mini.vmg xxx-bench
1.2       anton      63: 
                     64: check:  mini
1.7       anton      65:        ./mini test.mini | tr -d '\015' | diff - test.out
1.5       anton      66: 
                     67: checkall:
1.9       anton      68:        for i in 1 3 5 8 9 10; do make clean; echo $i; make check VMGEN=../vmgen CC="gcc -O3 -fomit-frame-pointer -Wall -DTHREADING_SCHEME=$i"; echo $i >>xxx-bench; time mini fib.mini 2>>xxx-bench; done; cat xxx-bench
1.4       anton      69: 
                     70: #make profiles
                     71: %.prof: %.mini mini
                     72:        ./mini -p $< 2>$@

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