19 CFLAGS
+= -I..
$(CPPFLAGS
) -Iexternal_libs
/libbstring
-Iexternal_libs
/libcchash \
20 -Iexternal_libs
/libmpa
-Iexternal_libs
/libmquark
-Iexternal_libs
/libev \
21 -Iexternal_libs
/libtommath
-Iexternal_libs
/libgdtoa
23 ALIBS
= external_libs
/libffi
/.libs
/libffi.a \
24 external_libs
/libgdtoa
/libgdtoa.a \
25 external_libs
/libtommath
/libtommath.a \
26 external_libs
/onig
/.libs
/libonig.a \
27 external_libs
/libltdl
/.libs
/libltdl.a \
28 external_libs
/libev
/.libs
/libev.a \
29 external_libs
/libbstring
/libbstring.a \
30 external_libs
/libcchash
/libcchash.a \
31 external_libs
/libmpa
/libptr_array.a \
32 external_libs
/libmquark
/libmquark.a
34 LIBS
=$(ALIBS
) -lz
-lm shotgun
/lib
37 # amd64 must have fPIC shared
50 OBJS
=$(patsubst %.c
,%.o
,$(shell ls
*.c
))
53 rubinius
: rubinius.bin
59 $(INSTALL
) -c
$(RBLIB
) $(LIBPATH
)
61 $(INSTALL
) -c rubinius.bin
$(BINPATH
)/rbx
$(BINSUFFIX
)
67 $(COMP
) $(CFLAGS
) -c
$<
69 external_libs
/libtommath
/libtommath.a
:
70 cd external_libs
/libtommath
; $(MAKE
)
72 external_libs
/onig
/config.h
:
73 cd external_libs
/onig
; CFLAGS
=-fPIC .
/configure
75 external_libs
/onig
/.libs
/libonig.a
: external_libs
/onig
/config.h
76 cd external_libs
/onig
; $(MAKE
)
78 # cinvoke doesn't produce a config.h
79 external_libs
/cinvoke
/lib
/libcinvoke.a
:
80 cd external_libs
/cinvoke
; CFLAGS
=-fPIC .
/configure
; $(MAKE
)
82 external_libs
/libev
/config.h
:
83 cd external_libs
/libev
; CFLAGS
=-fPIC .
/configure
85 external_libs
/libev
/.libs
/libev.a
: external_libs
/libev
/config.h
86 cd external_libs
/libev
; $(MAKE
) libev.la
88 external_libs
/libltdl
/config.h
:
89 cd external_libs
/libltdl
; CFLAGS
=-fPIC .
/configure
91 external_libs
/libltdl
/.libs
/libltdl.a
: external_libs
/libltdl
/config.h
92 cd external_libs
/libltdl
; $(MAKE
)
94 external_libs
/libbstring
/libbstring.a
:
95 cd external_libs
/libbstring
; $(MAKE
)
97 external_libs
/libcchash
/libcchash.a
:
98 cd external_libs
/libcchash
; $(MAKE
)
100 external_libs
/libmpa
/libptr_array.a
:
101 cd external_libs
/libmpa
; $(MAKE
)
103 external_libs
/libmquark
/libmquark.a
:
104 cd external_libs
/libmquark
; $(MAKE
)
106 external_libs
/libffi
/.libs
/libffi.a
:
107 cd external_libs
/libffi
; CFLAGS
=-fPIC .
/configure
&& $(MAKE
)
109 external_libs
/libgdtoa
/libgdtoa.a
:
110 cd external_libs
/libgdtoa
; $(MAKE
)
112 $(RBLIB
): config.h
$(DTRACE_H
) $(ALIBS
)
113 cd lib
; $(MAKE
) library
;
117 # Don't try to build main until librubinius exists
121 /usr
/sbin
/dtrace
-h
-s rubinius.d
-o dtrace.h
123 rubinius.bin
: $(RBLIB
) main.o rubinius.local.bin
124 $(COMP
) -o rubinius.bin main.o
$(RBLIB
) $(BIN_RPATH
) $(LDFLAGS
)
126 rubinius.local.bin
: $(RBLIB
) main.o
127 $(COMP
) -o rubinius.local.bin main.o lib
/$(RBXLIBLOCAL
) $(BIN_RPATHLOCAL
) $(LDFLAGS
)
129 test/test_state
: test/test_state.c library
130 $(COMP
) -c
-o
test/test_state.o
test/test_state.c
$(CFLAGS
)
131 $(COMP
) $(LIBS
) -o
test/test_state
test/test_state.o
$(RBLIB
)
133 test/test_gc
: test/test_gc.c library
134 $(COMP
) -c
-o
test/test_gc.o
test/test_gc.c
$(CFLAGS
)
135 $(COMP
) $(LIBS
) -o
test/test_gc
test/test_gc.o
$(RBLIB
)
137 test/test_instructions
: test/test_instructions.c library
138 $(COMP
) -c
-o
test/test_instructions.o
test/test_instructions.c
$(CFLAGS
)
139 $(COMP
) $(LIBS
) -o
test/test_instructions
test/test_instructions.o
$(RBLIB
)
141 test: test/test_state
test/test_instructions
143 .
/test/test_instructions
148 rm -f
*.o
*.lo
*.gen rubinius.bin rubinius.local.bin
150 cd lib
; $(MAKE
) clean
153 # Clean, but also nuke configs
155 rm -f config.h config.mk
157 rm -f config
/isbigendian
158 rm -f external_libs
/libev
/config.h
159 rm -f external_libs
/libltdl
/config.h
160 rm -f external_libs
/onig
/config.h
161 -cd external_libs
/libbstring
; $(MAKE
) clean
162 -cd external_libs
/libcchash
; $(MAKE
) clean
163 -cd external_libs
/libev
; $(MAKE
) clean
164 -cd external_libs
/libltdl
; $(MAKE
) clean
165 -cd external_libs
/libmpa
; $(MAKE
) clean
166 -cd external_libs
/libmquark
; $(MAKE
) clean
167 -cd external_libs
/libtommath
; $(MAKE
) clean
168 -cd external_libs
/onig
; $(MAKE
) clean
169 -cd external_libs
/libffi
; $(MAKE
) clean
170 -cd external_libs
/libgdtoa
; $(MAKE
) clean