mutated_ocaml / camlp4 / unmaintained / lib / Makefile

include ../config/Makefile.cnf

INCLUDES=-I $(OTOP)/parsing -I $(OTOP)/utils
LIBRARIES=gramlib.cma
OBJS=$(OTOP)/utils/misc.cmo $(OTOP)/parsing/linenum.cmo		\
     $(OTOP)/utils/warnings.cmo $(OTOP)/parsing/location.cmo	\
     $(OTOP)/utils/config.cmo debug.cmo loc.cmo			\
     token.cmo lexer_token.cmo lexer_error.cmo			\
     plexer.cmo grammar.cmo extfun.cmo				\
     fstream.cmo
CLEANFILES=plexer.ml

include ../config/Makefile.base

debug.cmo: debug.cmi
debug.cmo: debug.ml
	$(OCAMLC) -pp '$(CAMLP4BOOT)' -rectypes $(OCAMLCFLAGS) $< -c -o $@

plexer.cmo: plexer.ml plexer.cmi
	$(OCAMLC) $(OCAMLCFLAGS) $< -c -o $@

plexer.cmx: plexer.ml plexer.cmi
	$(OCAMLOPT) $(OCAMLCFLAGS) $< -c -o $@

$(LIBRARIES): $(OBJS)
	$(OCAMLC) -linkall $(OBJS) -a -o $(LIBRARIES)

$(LIBRARIESX): $(OBJSX)
	$(OCAMLOPT) -linkall $(OBJSX) -a -o $(LIBRARIESX)

$(LIBRARIESP): $(OBJSP)
	$(OCAMLOPT) -linkall $(OBJSP) -a -o $(LIBRARIESP)

install-local:
	-$(MKDIR) "$(LIBDIR)/camlp4"
	cp $(LIBRARIES) *.mli "$(LIBDIR)/camlp4/."
	cp *.cmi "$(LIBDIR)/camlp4/."
	test -f $(LIBRARIESX) && $(MAKE) installopt LIBDIR="$(LIBDIR)" || true

installopt:
	for f in $(LIBRARIESX) $(LIBRARIESP) *.cmx ; do \
		test -f $$f && cp $$f "$(LIBDIR)/camlp4/." || true ; \
	done
	# Special treatment for this one: some versions of make don't like $(A) in $(TARGET:.cma=.$(A))
	target="`echo $(LIBRARIES) | sed -e 's/\.cma$$/.$(A)/'`" ; \
	   if test -f $$target ; then \
	      cp $$target "$(LIBDIR)/camlp4/." && ( cd "$(LIBDIR)/camlp4/." && $(RANLIB) $$target ) \
	  fi

include .depend
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.