File: Makefile.am

package info (click to toggle)
hocr 0.10.18-3.2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 3,300 kB
  • sloc: ansic: 18,153; sh: 11,473; python: 1,422; makefile: 188; cpp: 19
file content (33 lines) | stat: -rw-r--r-- 716 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

EXTRA_DIST = hocr.i

if WITH_PYTHON

nodist_python_PYTHON = hocr.py
nodist_pyexec_PYTHON = _hocr.so

DEPS= $(top_builddir)/src/libhocr.la

CLEANFILES = *.o *.cxx *.so *wrap* *.py

all-am: _hocr.so

if LINUX_HOST
_hocr.so: hocr_wrap.cxx
	g++ -fPIC -c hocr_wrap.cxx $(PY_CFLAGS) -I$(top_srcdir)/src
	g++ -shared ../../src/.libs/libhocr.so hocr_wrap.o -o _hocr.so
endif

if DARWIN_HOST
_hocr.so: hocr_wrap.cxx
	g++ -dynamic -fPIC -c hocr_wrap.cxx $(PY_CFLAGS) -I$(top_srcdir)/src
	g++ -bundle -bundle_loader $(prefix)/bin/python ../../src/.libs/libhocr.dylib hocr_wrap.o -o _hocr.so
endif

hocr_wrap.cxx: hocr.i
	swig -python -c++ -threads hocr.i

install-exec-hook:
	chmod 755 $(DESTDIR)/$(pyexecdir)/_hocr.so

endif