diff options
-rw-r--r-- | misc/python/Makefile | 16 | ||||
-rwxr-xr-x | misc/python/mkdeps.py | 35 |
2 files changed, 5 insertions, 46 deletions
diff --git a/misc/python/Makefile b/misc/python/Makefile index dec00a632..4d09ad9ac 100644 --- a/misc/python/Makefile +++ b/misc/python/Makefile @@ -1,11 +1,10 @@ CXX = g++ -LANG_FLAGS = -fPIC -Wall -W -ftemplate-depth-255 +LANG_FLAGS = -fPIC -Wall -Wno-unused -ftemplate-depth-255 OPT_FLAGS = -g -Os -PYTHON_ROOT = /usr/lib/python2.3/config -PYTHON_INC = -I/usr/include/python2.3 +PYTHON_ROOT = /usr/lib/python2.4/config +PYTHON_INC = -I/usr/include/python2.4 PYTHON_DEF = -DBOOST_PYTHON_DYNAMIC_LIB -DBOOST_PYTHON_SOURCE -BOOST_ROOT = /usr/local/src/boost WRAPPER_CFLAGS = $(shell botan-config --cflags) SHARED_CFLAGS = $(LANG_FLAGS) $(OPT_FLAGS) $(PYTHON_INC) @@ -13,16 +12,11 @@ SHARED_CFLAGS = $(LANG_FLAGS) $(OPT_FLAGS) $(PYTHON_INC) BOOST_CFLAGS = $(PYTHON_DEF) $(SHARED_CFLAGS) WRAP_SRC = $(wildcard src/*) -WRAP_OBJS = $(patsubst src/%.cpp,build/botan/%.o,$(WRAP_SRC)) +WRAP_OBJS = $(patsubst src/%.cpp,%.o,$(WRAP_SRC)) all: botan/_botan.so -include boost.deps - -build/libboost_python.so: $(BOOST_OBJS) - $(CXX) -fPIC -shared -o $@ $(BOOST_DEF) -L$(PYTHON_ROOT) $(PYTHON_INC) -Wl,-soname,libboost_python.so $^ - -build/botan/%.o: src/%.cpp +%.o: src/%.cpp $(CXX) $(SHARED_CFLAGS) $(WRAPPER_CFLAGS) -c $< -o $@ botan/_botan.so: $(WRAP_OBJS) build/libboost_python.so diff --git a/misc/python/mkdeps.py b/misc/python/mkdeps.py deleted file mode 100755 index 64eafb9dc..000000000 --- a/misc/python/mkdeps.py +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/python - -import os, re, sys - -def boost_dir(): - return "/usr/local/src/boost/libs/python/src" - -def get_listing_of(dir): - list = []; - for root, dirs, files in os.walk(dir): - list = list + [os.path.join(root, name) for name in files] - list.sort() - return list - -def produce_output(list): - def obj_name(source): - return re.sub(r"^/.*/(.+).cpp$", r"build/boost/\1.o", source) - - def obj_deps(sources): - def obj_dep(source): - return obj_name(source) + ": " + source + "\n\t$(CXX) $(BOOST_CFLAGS) -c $< -o $@\n" - return map(obj_dep, sources); - - def file_lists(list): - def file_list(list, macro, trans): - return 'BOOST_' + macro + ' = ' + ' '.join(map(trans, list)) + "\n\n" - return file_list(list, 'SRC', None) + file_list(list, 'OBJS', obj_name) - - return file_lists(list) + "\n".join(obj_deps(list)) - -def main(): - print produce_output(get_listing_of(boost_dir())) - -if __name__ == "__main__": - sys.exit(main()) |