3 all: $(APPNAME
) docs
$(BUILDMO
)
7 ADD_DOCS
=AUTHORS README COPYING RELEASE_NOTES \
8 mp_templates.sample doc
/mp_function_reference.html
9 GRUTATXT_DOCS
=doc
/mp_index.html doc
/mp_cookbook.html doc
/mp_internals.html \
10 doc
/mp_configuration.html doc
/mp_data_model.html \
11 doc
/mp_man.html doc
/mp_interactive_dialog_boxes.html \
12 doc
/mp_actions.html doc
/mp_keycodes.html \
13 doc
/mp_encoding.html
$(APPNAME
).1
14 MP_DOCCER_DOCS
=doc
/mp_api.txt
15 G_AND_MP_DOCS
=doc
/mp_api.html
17 OBJS
=mp_core.o
$(DRV_OBJS
)
19 DIST_TARGET
=/tmp
/$(PROJ
)-$(VERSION
)
21 ##################################################################
27 $(CC
) $(CFLAGS
) -I.
`cat config.cflags` -c
$<
30 ( cd
$(MPDM
); $(MAKE
) )
33 ( cd
$(MPSL
); $(MAKE
) )
36 gcc
-MM
*.c
`cat config.cflags` > makefile.depend
38 $(APPNAME
): $(OBJS
) $(MPDM
)/libmpdm.a
$(MPSL
)/libmpsl.a
39 $(CCLINK
) $(CFLAGS
) $(OBJS
) `cat config.ldflags` -o
$@
41 mpv_kde4.o
: mpv_kde4.
cpp mpv_kde4.moc
42 $(CPP
) $(CFLAGS
) -I.
`cat config.cflags` -c
$<
44 mpv_kde4.moc
: mpv_kde4.
cpp
45 $(MOC
) -o mpv_kde4.moc mpv_kde4.
cpp
47 mpv_qt4.o
: mpv_qt4.
cpp mpv_qt4.moc
48 $(CPP
) $(CFLAGS
) -I.
`cat config.cflags` -c
$<
50 mpv_qt4.moc
: mpv_qt4.
cpp
51 $(MOC
) -o mpv_qt4.moc mpv_qt4.
cpp
54 $(WINDRES
) mp_res.rc mp_res.o
56 mp-5.exe
: $(OBJS
) mp_res.o
$(MPDM
)/libmpdm.a
$(MPSL
)/libmpsl.a
57 $(CC
) $(CFLAGS
) $(OBJS
) mp_res.o
`cat config.ldflags` -o
$@
60 rm -f
$(APPNAME
) $(LIB
) $(OBJS
) *.o
*.moc
tags *.
tar.gz
*.exe
*.zip .installer.c
*.1
61 (cd
$(MPDM
) ; make
clean)
62 (cd
$(MPSL
) ; make
clean)
65 rm -f config.h config.
cflags config.
ldflags \
66 makefile.opts Makefile po
/minimum-profit.pot
69 rm -f
$(MP_DOCCER_DOCS
) doc
/*.html
72 (cd
$(MPDM
) ; make
realclean)
73 (cd
$(MPSL
) ; make
realclean)
75 realdistclean
: realclean
77 .SUFFIXES
: .html .txt .rhtml
85 doc
/mp_man.html
: doc
/mp_man.txt
86 grutatxt
-dl
-t
"Minimum Profit Man Page" < $< > $@
88 doc
/mp_api.txt
: *.mpsl
89 mp_doccer
*.mpsl
-o doc
/mp_api
-f grutatxt \
90 -t
"Minimum Profit API" \
91 -b
"This reference documents version $(VERSION) of the MPSL API." \
92 -a
'Angel Ortega - angel@triptico.com'
94 $(APPNAME
).1: doc
/mp_man.txt
95 grutatxt
-m man
-t
"Minimum Profit" < doc
/mp_man.txt
> $(APPNAME
).1
98 (cd
$(MPDM
); $(MAKE
) docs
)
99 (cd
$(MPSL
); $(MAKE
) docs
)
101 distcopy
: distclean docs
102 mkdir
-p
$(DIST_TARGET
) ; \
103 tar cf
- * |
(cd
$(DIST_TARGET
) ; tar xf
-) ; \
104 (cd
$(MPDM
) ; $(MAKE
) distcopy DIST_TARGET
=$(DIST_TARGET
)/mpdm
) ; \
105 (cd
$(MPSL
) ; $(MAKE
) distcopy DIST_TARGET
=$(DIST_TARGET
)/mpsl
)
107 dist: distcopy po
/minimum-profit.pot build-mo
108 (cd
/tmp
; tar czf
- $(PROJ
)-$(VERSION
)/* ) > $(PROJ
)-$(VERSION
).
tar.gz
; \
109 rm -rf
$(DIST_TARGET
)
112 $(MAKE
) distcopy DIST_TARGET
=/tmp
/mp-midnight
113 (cd
/tmp
; tar czf
- mp-midnight
/* ) > mp-midnight.
tar.gz
; \
114 rm -rf
/tmp
/mp-midnight
119 i586-mingw32msvc-strip
$(APPNAME
)
120 install $(APPNAME
) win32
121 install mp_
*.mpsl win32
122 (DIR
=`pwd` ; cd
$(MPDM
) ; make installdoc DOCDIR
=$$DIR/win32
/doc
)
123 (DIR
=`pwd` ; cd
$(MPSL
) ; make installdoc DOCDIR
=$$DIR/win32
/doc
)
124 install $(DOCS
) win32
/doc
125 (cd win32
; aovwinstall mp-5
"Minimum Profit $(VERSION)" * doc
/*)
126 i586-mingw32msvc-strip win32
/installer.exe
127 mv win32
/installer.exe mp-
$(VERSION
).exe
131 wine ~
/.wine
/fake_windows
/Program\ Files
/Inno\ Setup\
5/ISCC.exe
/O.
/Fmp-
$(VERSION
) mp.iss
133 install: $(INSTALL_MSG
) installdoc
$(INSTALLMO
)
134 install $(APPNAME
) $(PREFIX
)/bin
/$(APPNAME
)
135 .
/mkinstalldirs
$(PREFIX
)/share
/$(APPNAME
)
136 .
/mkinstalldirs
$(PREFIX
)/share
/$(APPNAME
)/lang
137 install -m
644 mp_
*.mpsl
$(PREFIX
)/share
/$(APPNAME
)
138 install -m
644 lang
/*.mpsl
$(PREFIX
)/share
/$(APPNAME
)/lang
139 .
/mkinstalldirs
$(PREFIX
)/share
/man
/man1
140 [ -f
$(APPNAME
).1 ] && install -m
644 $(APPNAME
).1 $(PREFIX
)/share
/man
/man1
/$(APPNAME
).1 || true
141 ( cd
$(MPSL
) ; [ -x mpsl
] && install mpsl
$(PREFIX
)/bin || true
)
144 .
/mkinstalldirs
$(PREFIX
)/share
/doc
/$(APPNAME
)
145 ( cd
$(MPDM
); $(MAKE
) installdoc
)
146 ( cd
$(MPSL
); $(MAKE
) installdoc
)
147 install -m
644 doc
/* $(PREFIX
)/share
/doc
/$(APPNAME
)
148 install -m
644 $(ADD_DOCS
) $(PREFIX
)/share
/doc
/$(APPNAME
)
149 [ -f doc
/mp_index.html
] && install -m
644 doc
/mp_index.html
$(PREFIX
)/share
/doc
/$(APPNAME
)/index.html || true
151 uninstall: $(UNINSTALLMO
)
152 rm -f
$(PREFIX
)/bin
/$(APPNAME
)
153 rm -rf
$(PREFIX
)/share
/$(APPNAME
)
154 rm -rf
$(PREFIX
)/share
/doc
/$(APPNAME
)
155 rm -f
$(PREFIX
)/share
/man
/man1
/$(APPNAME
).1
156 rm -f
$(PREFIX
)/bin
/mpsl
158 po
/minimum-profit.pot
:
159 xgettext
-o
$@
--language
=C
--keyword
=L
--keyword
=LL mp
*.c
*.mpsl
162 for a in po
/*.po
; do \
163 sed
-i
-e
'/^#/d' $$a ; \
164 xgettext
--omit-header
-j
-o
$$a --language
=C \
165 --keyword
=L
--keyword
=LL mp
*.c
*.mpsl
; \
172 for i in po
/*.po
; do \
173 B
=`basename $$i .po` ; o
=po
/$$B.mo
; \
174 if
[ $$i -nt
$$o -o
! -f
$$o ] ; then msgfmt
-o
$$o $$i ; fi
; \
178 for a in po
/*.mo
; do \
179 B
=`basename $$a .mo` ; \
180 .
/mkinstalldirs
$(PREFIX
)/share
/locale
/$$B/LC_MESSAGES
; \
181 install -m
644 $$a $(PREFIX
)/share
/locale
/$$B/LC_MESSAGES
/minimum-profit.mo
; \
185 for a in po
/*.mo
; do \
186 B
=`basename $$a .mo` ; \
187 rm -f
$(PREFIX
)/share
/locale
/$$B/LC_MESSAGES
/minimum-profit.mo
; \
191 dpkg-buildpackage
-rfakeroot
-b
-uc
-us