18605f4d87
svn: r947
78 lines
2.2 KiB
Makefile
78 lines
2.2 KiB
Makefile
include @top_srcdir@/Makefile.comm
|
|
|
|
srcdir = @top_srcdir@
|
|
intl_libs = @INTLLIBS@
|
|
p15_inc = @P15_INCLUDES@
|
|
p20_inc = @P20_INCLUDES@
|
|
p21_inc = @P21_INCLUDES@
|
|
p22_inc = @P22_INCLUDES@
|
|
pycomp = ${srcdir}/py-compile
|
|
CFLAGS = -fPIC -shared -O @CFLAGS@ @CPPFLAGS@ -I@includedir@
|
|
LDFLAGS = @LDFLAGS@ -L@libdir@ @LIBS@
|
|
TRANSLATIONS = sv de fr es it pt_BR ru
|
|
|
|
# Use GNU make's ':=' syntax for nice wildcard use.
|
|
# If not using GNU make, then list all .py files individually
|
|
PYSRCS := ${wildcard *.py}
|
|
|
|
PYOBJS = ${PYSRCS:.py=.pyo}
|
|
|
|
# List only those modules that need the executable bit set
|
|
EXE1 = AddMedia.py EditSource.py gramps.py gramps_main.py
|
|
|
|
# Add their byte-compiled counterparts to the list...
|
|
EXE2 = ${EXE1:.py=.pyo}
|
|
EXES = ${EXE1} ${EXE2}
|
|
|
|
all: ${intl_libs} ${PYOBJS}
|
|
|
|
intl15.so: intl.c
|
|
$(CC) $(CFLAGS) $(LDFLAGS) $(p15_inc) -DVER15 -o $@ intl.c
|
|
|
|
intl20.so: intl.c
|
|
$(CC) $(CFLAGS) $(LDFLAGS) $(p20_inc) -DVER20 -o $@ intl.c
|
|
|
|
intl21.so: intl.c
|
|
$(CC) $(CFLAGS) $(LDFLAGS) $(p21_inc) -DVER21 -o $@ intl.c
|
|
|
|
intl22.so: intl.c
|
|
$(CC) $(CFLAGS) $(LDFLAGS) $(p22_inc) -DVER22 -o $@ intl.c
|
|
|
|
install:
|
|
${INSTALL} -d ${datadir}
|
|
(cd ${datadir} ;rm -f *.py *.pyo *.pyc *.glade *.xpm *.so)
|
|
${INSTALL} -m 644 *.py *.jpg *.pyo *.png *.glade *.xpm *.so ${datadir}
|
|
for i in ${EXES}; do \
|
|
chmod 755 ${datadir}/$$i; \
|
|
done
|
|
${INSTALL} -d ${prefix}/share/pixmaps
|
|
${INSTALL} -m 644 gramps.png ${prefix}/share/pixmaps
|
|
${INSTALL} -d ${prefix}/share/gnome/apps/Applications
|
|
${INSTALL} -m 644 gramps.desktop ${prefix}/share/gnome/apps/Applications
|
|
for i in ${TRANSLATIONS}; do\
|
|
${INSTALL} -d ${prefix}/share/locale/$$i; \
|
|
${INSTALL} -d ${prefix}/share/locale/$$i/LC_MESSAGES; \
|
|
${INSTALL} -m 644 locale/$$i/LC_MESSAGES/gramps.mo ${prefix}/share/locale/$$i/LC_MESSAGES; \
|
|
done
|
|
|
|
uninstall:
|
|
rm -f ${datadir}/*.py ${datadir}/*.pyo ${datadir}/*.glade ${datadir}/*.xpm
|
|
-rmdir ${datadir}
|
|
|
|
trans: po/template.po
|
|
./build_po
|
|
|
|
po/template.po: *.py *.glade */*.py */*.glade
|
|
|
|
clean:
|
|
-rm -f core *.pyo *.pyc *.bak *~
|
|
|
|
# Add PYTHON suffix rules to make's vocabulary
|
|
.SUFFIXES: .py .pyo
|
|
|
|
# How do we properly compile a python module?
|
|
.py.pyo:
|
|
chmod +x ${pycomp}
|
|
${pycomp} $<
|
|
|