-
Notifications
You must be signed in to change notification settings - Fork 17
/
Makefile
32 lines (22 loc) · 930 Bytes
/
Makefile
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
SRILM_LIBS=/home/speech/Resources/Tools/srilm/lib/i686-m64
SRILM_INC=/home/speech/Resources/Tools/srilm/include
PYTHON_INC=/opt/python/2.7/include/python2.7
PERL_INC=/usr/lib64/perl5/CORE
python: clean _srilm.so
_srilm.so: srilm.o srilm_python_wrap.o
g++ -shared $^ -loolm -ldstruct -lmisc -lz -lgomp -L$(SRILM_LIBS) -o $@
srilm_python_wrap.o: srilm_python_wrap.c
g++ -c -fpic $< -I/usr/local/include/ -I$(SRILM_INC) -I$(PYTHON_INC)
srilm_python_wrap.c: srilm_python.i
swig -python $<
perl: clean srilm.so
srilm.so: srilm.o srilm_perl_wrap.o
g++ -shared $^ -loolm -ldstruct -lmisc -lz -lgomp -L$(SRILM_LIBS) -o $@
srilm_perl_wrap.o: srilm_perl_wrap.c
g++ -c -fpic $< -I/usr/local/include/ -I$(SRILM_INC) -I$(PERL_INC)
srilm_perl_wrap.c: srilm_perl.i
swig -perl $<
srilm.o: srilm.c
g++ -c -fpic $< -I/usr/local/include/ -I$(SRILM_INC) -I$(PYTHON_INC)
clean:
\rm -fr srilm.o srilm_*_wrap.* *.so srilm.py* srilm.pm