Hello, Did you try to export CFLAGS and LDFLAGS? 28 лютого 2009 о 13:45 +0100 Goswin von Brederlow написав(-ла): > Hi, > > I have a problem in the libfuse-ocaml package I'm writing. To compile > I need to set some CFLAGS and to link some LDFLAGS. My Makefile looks > like this: > > SOURCES = fuse.mli fuse.ml fuse_stubs.c > CFLAGS = -O2 -g -W -Wall > override CFLAGS += $(shell pkg-config --cflags fuse) > #CLIBS := $(shell pkg-config --libs fuse) > CLIBS := fuse > RESULT = fuse > > -include $(OCAMLMAKEFILE) > > > The override is needed because dpkg-buildpackage sets CFLAGS as > environment variable. Now this works fine and CFLAGS is set. I > verified that with $(info CFLAGS = $(CFLAGS)). > > CFLAGS remain set inside the OCAMLMAKEFILE up to the point where it > calls > > native-code: $(PRE_TARGETS) > $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) $(NCRESULT) \ > REAL_RESULT="$(NCRESULT)" \ > REAL_OCAMLC="$(OCAMLOPT)" \ > make_deps=yes > > When recursing the CFLAGS get reset to dpkg-buildpackage values. How > am I suposed to set some CFLAGS? > > > On the same note how do I set LDFLAGS. The CLIBS variable > automatically adds -l to its contents, which does not work well with > pkg-config --libs fuse ==> -pthread -lfuse -lrt -ldl > > MfG > Goswin > > > -- > To UNSUBSCRIBE, email to debian-ocaml-maint-REQUEST@lists.debian.org > with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org > >
Attachment:
signature.asc
Description: Digital signature