[Omake] building C binding library
Aleksey Nogin
nogin at metaprl.org
Mon Sep 17 21:40:04 PDT 2007
On 17.09.2007 21:23, Anastasia Gornostaeva wrote:
>> section
>> CFILES = mczlib_stub$(EXT_OBJ)
>> OCAML_LINK_FLAGS += -cclib -lz $(CFILES)
>> OCAMLLIBS = $(OCamlLibrary mlzlib, mlzlib)
>> $(OCAMLLIBS): $(CFILES)
>> .DEFAULT: $(OCAMLLIBS)
>
> Now it does not put attentieon neither on INCLUDES nor CFLAGS variables.
> Sorry.
>
Could you be a bit more specific? Where exactly are you defining the
INCLUDES and CFLAGS?
If you define them inside a "section" block, then you need to tie the
mczlib_stub$(EXT_OBJ) target to the environment defined in that section
block - just add a "$(CFILES):" line.
Alternatively, you can define INCLUDES and CFLAGS at the "top" level of
you OMakefile. The default environment for implicit rule is the one at
the end of the OMakefile for that difectory.
For example, if you have foo.c, bar.c and baz.c and you do
foo.o:
section
CFLAGS += -O2
bar.o:
CFLAGS += -g
then foo.c will be compiled with default flags, bar.c - with "-O2" and
baz.c - with "-g" (but without "-O2").
Aleksey
More information about the Omake
mailing list