Skip to content

Commit

Permalink
compile with ocamlc not gcc. contributed by David Allsopp
Browse files Browse the repository at this point in the history
  • Loading branch information
vincenthz committed Oct 9, 2009
1 parent 046df3f commit 6550b35
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
CC = gcc
CFLAGS = -Wall -O3 -funroll-loops
CFLAGS = -Wall -O3 -funroll-loops -I/usr/include
OCAMLC = ocamlc
OCAMLOPT = ocamlopt
OCAML_PATH = $(shell $(OCAMLC) -where)
CFLAGS += -I $(OCAML_PATH)
OCAMLMKLIB = ocamlmklib

OCAMLOPTFLAGS =

Expand Down Expand Up @@ -67,10 +65,10 @@ sha.test: sha1.cmxa sha256.cmxa sha512.cmxa sha.test.cmx
$(OCAMLOPT) $(OCAMLOPTFLAGS) -c -o $@ $<

%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
$(OCAMLC) -ccopt "$(CFLAGS)" -c -o $@ $<

%.lib.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
$(OCAMLC) -ccopt "$(CFLAGS)" -c -o $@ $<

clean:
rm -f *.o *.a *.cmo *.cmi *.cma *.cmx *.cmxa sha.test $(PROGRAMS)

0 comments on commit 6550b35

Please sign in to comment.