Custom compile flags
Posted: 25 Jun 2011 11:47
Hi!
I have a python class that I'd like to use from a video filter, but I need to pass some flags/params to the compiler. I have a test app with the Makefile below, which is working well:
PYLIB=/usr/lib/python2.6/config/libpython2.6.a
PYINC=-I-I/usr/include -I/usr/include -I/usr/include/python2.6 -I/usr/include/python2.6 -I/home/linaro/Projects -I/usr/lib/python2.6/dist-packages
LIBS=-L/usr/lib -lssl -lcrypto -lssl -lcrypto -lpython2.6 -L/usr/lib -lz -lpthread -ldl -lutil -lm
OPTS=-fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions
PROGRAMS=test
all: $(PROGRAMS)
test: test.o
gcc test.o $(LIBS) $(PYLIB) -o test
test.o: test.c
gcc test.c -c $(PYINC) $(OPTS)
clean:
rm -f $(PROGRAMS) *.o *.pyc core
Where should I set these flags? In modules/video_filter/Makefile.am or somewhere else? How can I pass these flags (params) to the compiler to build only the plugin with them? I am using "sudo make install libopencv_example_plugin.la" to compile the plugin.
Thanks for your answer.
biga.
I have a python class that I'd like to use from a video filter, but I need to pass some flags/params to the compiler. I have a test app with the Makefile below, which is working well:
PYLIB=/usr/lib/python2.6/config/libpython2.6.a
PYINC=-I-I/usr/include -I/usr/include -I/usr/include/python2.6 -I/usr/include/python2.6 -I/home/linaro/Projects -I/usr/lib/python2.6/dist-packages
LIBS=-L/usr/lib -lssl -lcrypto -lssl -lcrypto -lpython2.6 -L/usr/lib -lz -lpthread -ldl -lutil -lm
OPTS=-fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions
PROGRAMS=test
all: $(PROGRAMS)
test: test.o
gcc test.o $(LIBS) $(PYLIB) -o test
test.o: test.c
gcc test.c -c $(PYINC) $(OPTS)
clean:
rm -f $(PROGRAMS) *.o *.pyc core
Where should I set these flags? In modules/video_filter/Makefile.am or somewhere else? How can I pass these flags (params) to the compiler to build only the plugin with them? I am using "sudo make install libopencv_example_plugin.la" to compile the plugin.
Thanks for your answer.
biga.