I'm modifying sampler_usr.c for an operator panel project.
The new component uses embeded python.
I had to hard code the compiler flags in the submakefile,
to make it work.
This works but for instance it looks for a particular python version
rather then the version available.
Hoping someone could tell me the proper way to get the
compiler flags from the make system.
snipit from hal/component/submakefile;
PYSAMPLERSRCS := hal/components/sampler_py.c
USERSRCS += $(PYSAMPLERSRCS)
PYFLAGS := -L/usr/lib/python2.7/config -lpthread -ldl -lutil -lm -lpython2.7
-Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions
../bin/pysampler: $(call TOOBJS, $(PYSAMPLERSRCS)) ../lib/liblinuxcnchal.so.0
$(ECHO) Linking $(notdir $@)
$(Q)$(CC) $(PYFLAGS) -o $@ $^
TARGETS += ../bin/pysampler
Note the PYFLAGS that I added. usually I see its $(LDFLAGS)
If I use LDFLAGS then it doesn't see the included file Python.h
full submakefile:
http://pastebin.com/27M7bggT
Thanks
Chris M
------------------------------------------------------------------------------
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers