Commits

Reid van Melle  committed 948efe1

Got everything building properly (byte/native) + added a META file
- got the make install and make uninstall working via ocamlfind

  • Participants
  • Parent commits fcf76c3

Comments (0)

Files changed (3)

+requires="lablgtk2 cairo"
+version="0.8"
+archive(byte)="mlclutter.cma"
+archive(native)="mlclutter.cmxa"
+linkopts=""
+

File src/Makefile.in

 %Props.ml o%Props.ml: %.props propcc.exe
 	./propcc.exe $<
 
+CMIFILES := $(OBJS:.cmo=.cmi)
+install:
+	ocamlfind install clutter META libmlclutter.a mlclutter.a libclutter-ocaml.a dllclutter-ocaml.so dllmlclutter.so mlclutter.cmxa mlclutter.cma $(CMIFILES)
+
+uninstall:
+	ocamlfind remove clutter
+
 # Flags for the C compiler.
 
 CLUTTER_FLAGS   := @CLUTTER_CFLAGS@
 .c.o:
 	$(OCAMLC) -c -ccopt "$(CFLAGS)" $<
 
-all: $(OPT_TARGETS) $(C_ARCHIVES)
-
+all: $(OPT_TARGETS) $(BYTE_TARGETS) $(C_ARCHIVES)
+native: $(OPT_TARGETS) $(C_ARCHIVES)
 byte: $(BYTE_TARGETS) $(C_ARCHIVES)
 
 ml_clutter.c: pango_tags.c clutter_tags.c

File tests/Makefile.in

 pkg_cairo	= @pkg_cairo@
 
 OCAMLCPACKAGES	:= -package lablgtk2,bigarray,cairo
-OCAMLCFLAGS	:= -g -w s -I ../src ../src/mlclutter.cma
-OCAMLCLIBS	:= -cclib -L../src 
+OCAMLCFLAGS	:= -linkpkg -custom -g -w s -I ../src ../src/mlclutter.cma
 
-OCAMLOPTPACKAGES := -linkpkg $(OCAMLCPACKAGES)
-OCAMLOPTFLAGS	:= -w s -I ../src
+OCAMLOPTPACKAGES := $(OCAMLCPACKAGES)
+OCAMLOPTFLAGS	:= -linkpkg -w s -I ../src
 
 CLUTTER_FLAGS   := @CLUTTER_LIBS@
 CLUTTER_CAIRO_FLAGS := @CLUTTER_CAIRO_LIBS@
 
-OCAMLOPTLIBS	:= $(OCAMLCLIBS) -cclib '$(CLUTTER_FLAGS)' -cclib '$(CLUTTER_CAIRO_FLAGS)' -cclib -lclutter-ocaml ../src/mlclutter.cmxa
+OCAMLCLIBS	:= -cclib -L../src -cclib '$(CLUTTER_FLAGS)' -cclib '$(CLUTTER_CAIRO_FLAGS)' -cclib -lclutter-ocaml
+OCAMLOPTLIBS	:= $(OCAMLCLIBS) ../src/mlclutter.cmxa
 
 # test-cogl-tex-file --> need to finish this one test-events
 TARGETS	:= test-behave test-events test-cogl-primitives \
 BYTE_TARGETS    := $(TARGETS:=.byte)
 OPT_TARGETS	:= $(TARGETS:=.opt)
 
-all: $(OPT_TARGETS) ../src/mlclutter.cmxa
-byte: $(BYTE_TARGETS)
+native: $(OPT_TARGETS) ../src/mlclutter.cmxa
+byte: $(BYTE_TARGETS) ../src/mlclutter.cma
+all: $(OPT_TARGETS) $(BYTE_TARGETS) ../src/mlclutter.cmxa ../src/mlclutter.cma
 
 %.opt: %.cmx
 	ocamlfind ocamlopt $(OCAMLOPTPACKAGES) $(OCAMLOPTFLAGS) $(OCAMLOPTLIBS) -o $@ $^