# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-OCAMLCFLAGS = -g -warn-error CDEFLMPSUVYZX -I +camlp4 -I ../generator-lib
+OCAMLCFLAGS = -g -warn-error CDEFLMPSUVYZX -I +camlp4 -I ../generator
OCAMLOPTFLAGS = $(OCAMLCFLAGS)
-PP = -pp '$(CAMLP4O) ../generator-macros/pa_wrap.cmo -impl'
+PP = -pp '$(CAMLP4O) ../generator/pa_wrap.cmo -impl'
API_FILES = $(wildcard *.api)
OBJECTS = $(patsubst %.api,%.cmo,$(API_FILES))
-noinst_SCRIPTS = apis.cma
-
-apis.cma: $(OBJECTS) ../generator-lib/generator_lib.cma
+# Note this target is built by a recursive call from generator/Makefile.am.
+apis.cma: $(OBJECTS) ../generator/generator_lib.cma
$(OCAMLFIND) ocamlc -linkall -a $(OBJECTS) -o apis.cma
-%.cmo: %.api ../generator-lib/generator_lib.cma ../generator-macros/pa_wrap.cmo
+%.cmo: %.api ../generator/generator_lib.cma ../generator/pa_wrap.cmo
$(OCAMLFIND) ocamlc $(OCAMLOPTFLAGS) $(PP) -impl $< -c -o $@
CLEANFILES = *.cmi *.cmo *.cmx *.cma *.cmxa *~