Makefile 776 B

12345678910111213141516171819202122232425262728293031
  1. OCAMLOPT=ocamlopt
  2. OCAMLC=ocamlc
  3. FLAGS=-package extlib -safe-string -I ../extlib-leftovers -I ../swflib
  4. FILES=tTFData tTFParser tTFTools tTFSwfWriter tTFCanvasWriter tTFJsonWriter
  5. LIBS=extLib swflib unix
  6. OUTPUT=ttf
  7. all: native bytecode
  8. native: ttflib.cmxa
  9. bytecode: ttflib.cma
  10. ttflib.cmxa: $(FILES:=.ml)
  11. ocamlfind $(OCAMLOPT) $(FLAGS) $(FILES:=.ml) -g -a -o ttflib.cmxa
  12. ttflib.cma: $(FILES:=.ml)
  13. ocamlfind $(OCAMLC) $(FLAGS) $(FILES:=.ml) -g -a -o ttflib.cma
  14. exec:
  15. ocamlfind $(OCAMLOPT) $(FLAGS) $(LIBS:=.cmxa) $(FILES:=.ml) main.ml -g -o $(OUTPUT)
  16. clean:
  17. rm -rf ttflib.cmxa ttflib.cma ttflib.lib ttflib.a $(wildcard *.cmx) $(wildcard *.obj) $(wildcard *.o) $(wildcard *.cmi) $(wildcard *.cmo)
  18. .PHONY: all native bytecode clean exec
  19. Makefile: ;
  20. $(FILES:=.ml): ;