@@ -13,14 +13,16 @@ CAMLDEP=ocamldep.opt$(EXE)
1313COMPFLAGS = -g -w +6-40-30-23 -warn-error +a-40-30-23
1414
1515
16- .SUFFIXES : .mli .ml .cmi .cmx .mll .c .o
16+ .SUFFIXES : .mli .ml .cmi .cmx .mll .c .o .cmo
1717
1818print-% : ; @echo $* = $($* )
1919
2020INCLUDES = -I +compiler-libs -I stubs -I ext -I common -I syntax -I depends -I core -I bsb -I ounit -I ounit_tests
2121
2222.mli.cmi :
2323 $(NATIVE ) $(INCLUDES ) $(COMPFLAGS ) -c $<
24+ .ml.cmo :
25+ ocamlc.opt $(INCLUDES ) $(COMPFLAGS ) -c $<
2426
2527.ml.cmx :
2628 $(NATIVE ) $(INCLUDES ) $(COMPFLAGS ) -c $<
@@ -44,7 +46,7 @@ ext/int_vec.ml: ext/vec.cppo.ml
4446ext/resize_array.ml : ext/vec.cppo.ml
4547 cppo -D TYPE_FUNCTOR $< -o $@
4648ext/string_set.ml : ext/set.cppo.ml
47- cppo -D TYPE_STRING $< -o $@
49+ cppo -D TYPE_STRING $< -o $@
4850ext/set_int.ml : ext/set.cppo.ml
4951 cppo -D TYPE_INT $< -o $@
5052ext/ident_set.ml : ext/set.cppo.ml
@@ -134,6 +136,7 @@ OUNIT_TESTS_SRCS = ounit_tests_util \
134136 ounit_ordered_hash_set_tests \
135137 ounit_vec_test \
136138 ounit_string_tests\
139+ ounit_topsort_tests\
137140 ounit_tests_main
138141OUNIT_TESTS_CMXS = $(addprefix ounit_tests/, $(addsuffix .cmx, $(OUNIT_TESTS_SRCS ) ) )
139142
@@ -173,7 +176,9 @@ EXT_SRCS = ext_util\
173176 string_set\
174177 set_int\
175178 set_poly\
176- ext_scc ext_pp_scope\
179+ ext_scc \
180+ ext_topsort\
181+ ext_pp_scope\
177182 ext_io\
178183 ident_hash_set\
179184 hash_set_poly\
@@ -182,6 +187,7 @@ EXT_SRCS = ext_util\
182187 ext_filename
183188
184189EXT_CMXS =$(addprefix ext/, $(addsuffix .cmx, $(EXT_SRCS ) ) )
190+ EXT_CMOS =$(addprefix ext/, $(addsuffix .cmo, $(EXT_SRCS ) ) )
185191COMMON_SRCS = bs_version js_config bs_pkg ext_log bs_loc bs_warnings lam_methname binary_cache
186192COMMON_CMXS = $(addprefix common/, $(addsuffix .cmx, $(COMMON_SRCS ) ) )
187193SYNTAX_SRCS =ast_derive_constructor ast_derive_util ast_exp ast_external ast_lift \
@@ -226,7 +232,8 @@ MAINS_CMXS=$(addsuffix .cmx, $(MAIN_SRCS))
226232
227233ounit.cmxa : $(OUNIT_CMXS )
228234 ocamlopt.opt -a $^ -o $@
229-
235+ ext.cma : $(EXT_CMOS )
236+ ocamlc.opt -a $^ -o $@
230237ext.cmxa : $(EXT_CMXS )
231238 ocamlopt.opt -a $^ -o $@
232239common.cmxa :$(COMMON_CMXS )
@@ -370,7 +377,7 @@ bin/all_ounit_tests.ml:./bin/bspack.exe
370377
371378
372379bin/all_ounit_tests.exe : stubs/ext_basic_hash_stubs.c bin/all_ounit_tests.mli bin/all_ounit_tests.ml
373- ocamloptp -g -I bin -w -a unix.cmxa $^ -o $@
380+ ocamloptp -P a - g -I bin -w -a unix.cmxa $^ -o $@
374381
375382test :bin/all_ounit_tests.exe
376383 $^ && ocamlprof bin/all_ounit_tests.ml > bin/all_ounit_tests.i.ml && rm ocamlprof.dump
0 commit comments