set version to 1.1.4
[voodoo-lang.git] / test / Makefile
blobc1fd9c90e49e151b816fd9b2fb43d3240fb726af
1 include ../Makefile.cfg
3 NASM ?= nasm
4 VOODOOC ?= env RUBYLIB=$(PWD)/../lib:$(RUBYLIB) ../bin/voodooc
6 TARGETS = add auto-bytes auto-words at block bitwise bytes call div \
7 else-if fact func goto group hello if labels libfunc.so \
8 libgroup.so libvar.so many-args many-args-tail many-locals mod \
9 mul plusminus raw restore-frame restore-locals rotate \
10 save-frame-and-locals set-at set-byte set-word shift \
11 sub substitute-number tail-calls var vtable gcd
13 all : $(TARGETS)
15 clean :
16 -for target in $(TARGETS); do rm "$$target.asm" "$$target.o" "$$target.s"; 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