added groups
[voodoo-lang.git] / test / Makefile
blobf411b4d39e7615d14b5e15d4f78626da9ce9ca6a
1 include ../Makefile.cfg
3 NASM ?= nasm
4 VOODOOC ?= env RUBYLIB=$(PWD)/../lib:$(RUBYLIB) ../bin/voodooc
6 TARGETS = auto-bytes auto-words at block bitwise bytes call div \
7 else-if fact func goto group hello if libfunc.so libgroup.so \
8 libvar.so many-args many-args-tail many-locals mod mul \
9 plusminus raw restore-frame restore-locals rotate \
10 save-frame-and-locals set-at set-byte set-word shift \
11 substitute-number tail-calls var vtable gcd
13 all : $(TARGETS)
15 clean :
16 -for target in $(TARGETS); do rm "$$target.asm" "$$target.o"; done
18 distclean : clean
19 -rm $(TARGETS)
21 func : func.o libfunc.so
22 $(CC) func.o -o func -L. -lfunc
24 group : group.o libgroup.so
25 $(CC) group.o -o group -L. -lgroup
27 test : $(TARGETS)
28 env RUBYLIB=$(PWD)/../lib:$(RUBYLIB) RUBY=$(RUBY) ./test
30 gcd.o : gcd.rb
31 env RUBYLIB=$(PWD)/../lib:$(RUBYLIB) $(RUBY) gcd.rb
33 var : var.o libvar.so
34 $(CC) var.o -o var -L. -lvar
36 .SUFFIXES : .asm .o .s .so .voo
38 .asm.o :
39 $(NASM) -f elf $<
41 .o :
42 $(CC) $< -o $@
44 .o.so :
45 $(CC) -shared $< -o $@
47 .s.o :
48 $(GAS) $< -o $@
50 .voo.asm :
51 $(VOODOOC) -f nasm -o $@ $<
53 .voo.o :
54 $(VOODOOC) -o $@ $<
56 .voo.s :
57 $(VOODOOC) -f gas -o $@ $<
59 .PHONY : all clean distclean test