Skip to content

Commit

Permalink
added OCAMLOPT + default ocamlopt.opt on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ncannasse committed Apr 16, 2012
1 parent 09d223d commit a1f4e12
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@

OUTPUT=haxe

OCAMLOPT=ocamlopt

CFLAGS= -g -I libs/extlib -I libs/extc -I libs/neko -I libs/swflib -I libs/xml-light

CC_CMD = ocamlopt $(CFLAGS) -c $<
CC_PARSER_CMD = ocamlopt -pp camlp4o $(CFLAGS) -c parser.ml
CC_CMD = $(OCAMLOPT) $(CFLAGS) -c $<
CC_PARSER_CMD = $(OCAMLOPT) -pp camlp4o $(CFLAGS) -c parser.ml

LIBS=unix.cmxa str.cmxa libs/extlib/extLib.cmxa libs/xml-light/xml-light.cmxa libs/swflib/swflib.cmxa \
libs/extc/extc.cmxa libs/neko/neko.cmxa
Expand All @@ -28,7 +30,7 @@ libs:
(cd libs/xml-light; make xml-light.cmxa)

haxe: $(MODULES:=.cmx)
ocamlopt -o $(OUTPUT) $(NATIVE_LIBS) $(LIBS) $(MODULES:=.cmx)
$(OCAMLOPT) -o $(OUTPUT) $(NATIVE_LIBS) $(LIBS) $(MODULES:=.cmx)

codegen.cmx: typeload.cmx typecore.cmx type.cmx genxml.cmx common.cmx ast.cmx

Expand Down
6 changes: 4 additions & 2 deletions Makefile.win
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ include Makefile

OUTPUT=haxe.exe

OCAMLOPT=ocamlopt.opt

NATIVE_LIBS = shell32.lib libs/extc/extc_stubs.obj libs/extc/zlib/zlib.lib

FILTER=sed 's/File "\([^"]\+\)", line \([0-9]\+\), \(.*\)/\1(\2): \3/' tmp.cmi

CC_CMD=(ocamlopt $(CFLAGS) -c $< 2>tmp.cmi && $(FILTER)) || ($(FILTER) && exit 1)
CC_PARSER_CMD=(ocamlopt -pp camlp4o $(CFLAGS) -c parser.ml 2>tmp.cmi && $(FILTER)) || ($(FILTER) && exit 1)
CC_CMD=($(OCAMLOPT) $(CFLAGS) -c $< 2>tmp.cmi && $(FILTER)) || ($(FILTER) && exit 1)
CC_PARSER_CMD=($(OCAMLOPT) -pp camlp4o $(CFLAGS) -c parser.ml 2>tmp.cmi && $(FILTER)) || ($(FILTER) && exit 1)

0 comments on commit a1f4e12

Please sign in to comment.