shared libraries can now export variables on MIPS
[voodoo-lang.git] / test / Makefile
blob482ccdacbcf92157b0e5010d008c827562d52c20
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 else-if fact \
7 func goto hello if libfunc.so libvar.so many-args many-args-tail \
8 many-locals mod mul plusminus raw restore-frame restore-locals \
9 rotate save-frame-and-locals set-at set-byte set-word shift \
10 substitute-number tail-calls var vtable gcd
12 all : $(TARGETS)
14 clean :
15 -for target in $(TARGETS); do rm "$$target.asm" "$$target.o"; done
17 distclean : clean
18 -rm $(TARGETS)
20 func : func.o libfunc.so
21 $(CC) func.o -o func -L. -lfunc
23 test : $(TARGETS)
24 env RUBYLIB=$(PWD)/../lib:$(RUBYLIB) RUBY=$(RUBY) ./test
26 gcd.o : gcd.rb
27 env RUBYLIB=$(PWD)/../lib:$(RUBYLIB) $(RUBY) gcd.rb
29 var : var.o libvar.so
30 $(CC) var.o -o var -L. -lvar
32 .SUFFIXES : .asm .o .s .so .voo
34 .asm.o :
35 $(NASM) -f elf $<
37 .o :
38 $(CC) $< -o $@
40 .o.so :
41 $(CC) -shared $< -o $@
43 .s.o :
44 $(GAS) $< -o $@
46 .voo.asm :
47 $(VOODOOC) -f nasm -o $@ $<
49 .voo.o :
50 $(VOODOOC) -o $@ $<
52 .voo.s :
53 $(VOODOOC) -f gas -o $@ $<
55 .PHONY : all clean distclean test