Commits

Reid van Melle committed 68ecf13

Little fix for link arguments for both labgtk2 and cairo (use ocamlfind properly)

Comments (0)

Files changed (2)

examples/Makefile.in

 OCAMLCFLAGS	:= -g -w s -I ../src ../src/mlclutter.cma
 OCAMLCLIBS	:= -cclib -L../src 
 
-OCAMLOPTPACKAGES := $(OCAMLCPACKAGES)
+OCAMLOPTPACKAGES := -linkpkg $(OCAMLCPACKAGES)
 OCAMLOPTFLAGS	:= -w s -I ../src
 CLUTTER_FLAGS   := $(shell pkg-config --libs clutter-0.8)
 CLUTTER_CAIRO_FLAGS := $(shell pkg-config --libs clutter-cairo-0.8)
-OCAMLOPTLIBS	:= $(OCAMLCLIBS) -cclib '$(CLUTTER_FLAGS)' -cclib '$(CLUTTER_CAIRO_FLAGS)' -cclib -lclutter-ocaml -I +cairo cairo.cmxa -I +lablgtk2 lablgtk.cmxa ../src/mlclutter.cmxa
+OCAMLOPTLIBS	:= $(OCAMLCLIBS) -cclib '$(CLUTTER_FLAGS)' -cclib '$(CLUTTER_CAIRO_FLAGS)' -cclib -lclutter-ocaml ../src/mlclutter.cmxa
 
 # test-cogl-primitives test-cogl-tex-file
 TARGETS         := actor1 actor2 behave cogl-actor effects flowers

tests/Makefile.in

 OCAMLCFLAGS	:= -g -w s -I ../src ../src/mlclutter.cma
 OCAMLCLIBS	:= -cclib -L../src 
 
-OCAMLOPTPACKAGES := $(OCAMLCPACKAGES)
+OCAMLOPTPACKAGES := -linkpkg $(OCAMLCPACKAGES)
 OCAMLOPTFLAGS	:= -w s -I ../src
 CLUTTER_FLAGS   := $(shell pkg-config --libs clutter-0.8)
 CLUTTER_CAIRO_FLAGS := $(shell pkg-config --libs clutter-cairo-0.8)
-OCAMLOPTLIBS	:= $(OCAMLCLIBS) -cclib '$(CLUTTER_FLAGS)' -cclib '$(CLUTTER_CAIRO_FLAGS)' -cclib -lclutter-ocaml -I +lablgtk2 lablgtk.cmxa ../src/mlclutter.cmxa
+OCAMLOPTLIBS	:= $(OCAMLCLIBS) -cclib '$(CLUTTER_FLAGS)' -cclib '$(CLUTTER_CAIRO_FLAGS)' -cclib -lclutter-ocaml ../src/mlclutter.cmxa
 
 # test-cogl-tex-file --> need to finish this one
 TARGETS	:= test-behave test-cogl-primitives \
 	ocamlfind ocamlc $(OCAMLCPACKAGES) $(OCAMLCFLAGS) $(OCAMLCLIBS) -o $@ $^
 
 test-behave.opt: test-behave.cmx
-	ocamlfind ocamlopt $(OCAMLOPTPACKAGES) $(OCAMLOPTFLAGS) $(OCAMLOPTLIBS) -o $@ $^
+	ocamlfind $(OCAMLOPTPACKAGES) $(OCAMLOPTFLAGS) $(OCAMLOPTLIBS) -o $@ $^
 
 test-cogl-primitives: test-cogl-primitives.cmo
 	ocamlfind ocamlc $(OCAMLCPACKAGES) $(OCAMLCFLAGS) $(OCAMLCLIBS) -o $@ $^