3 all: $(APPNAME
) docs build-mo
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
$(APPNAME
).1
13 MP_DOCCER_DOCS
=doc
/mp_api.txt
14 G_AND_MP_DOCS
=doc
/mp_api.html
16 OBJS
=mp_core.o
$(DRV_OBJS
)
18 DIST_TARGET
=/tmp
/$(PROJ
)-$(VERSION
)
20 ##################################################################
26 $(CC
) $(CFLAGS
) -I.
`cat config.cflags` -c
$<
29 ( cd
$(MPDM
); $(MAKE
) )
32 ( cd
$(MPSL
); $(MAKE
) )
35 gcc
-MM
*.c
`cat config.cflags` > makefile.depend
37 $(APPNAME
): $(OBJS
) $(MPDM
)/libmpdm.a
$(MPSL
)/libmpsl.a
38 $(CCLINK
) $(CFLAGS
) $(OBJS
) `cat config.ldflags` -o
$@
40 mpv_kde4.o
: mpv_kde4.
cpp mpv_kde4.moc
41 $(CPP
) $(CFLAGS
) -I.
`cat config.cflags` -c
$<
43 mpv_kde4.moc
: mpv_kde4.
cpp
44 $(MOC
) -o mpv_kde4.moc mpv_kde4.
cpp
47 $(WINDRES
) mp_res.rc mp_res.o
49 wmp.exe
: $(OBJS
) mp_res.o
$(MPDM
)/libmpdm.a
$(MPSL
)/libmpsl.a
50 $(CC
) $(CFLAGS
) $(OBJS
) mp_res.o
`cat config.ldflags` -o
$@
53 rm -f
$(APPNAME
) $(LIB
) $(OBJS
) *.o
*.moc
tags *.
tar.gz
*.exe
*.zip .installer.c
*.1
54 (cd
$(MPDM
) ; make
clean)
55 (cd
$(MPSL
) ; make
clean)
58 rm -f config.h config.
cflags config.
ldflags \
59 makefile.opts Makefile po
/minimum-profit.pot
62 rm -f
$(MP_DOCCER_DOCS
) doc
/*.html
65 (cd
$(MPDM
) ; make
realclean)
66 (cd
$(MPSL
) ; make
realclean)
68 realdistclean
: realclean
70 .SUFFIXES
: .html .txt .rhtml
78 doc
/mp_man.html
: doc
/mp_man.txt
79 grutatxt
-dl
-t
"Minimum Profit Man Page" < $< > $@
81 doc
/mp_api.txt
: *.mpsl
82 mp_doccer
*.mpsl
-o doc
/mp_api
-f grutatxt \
83 -t
"Minimum Profit API" \
84 -b
"This reference documents version $(VERSION) of the MPSL API." \
85 -a
'Angel Ortega - angel@triptico.com'
87 $(APPNAME
).1: doc
/mp_man.txt
88 grutatxt
-m man
-t
"Minimum Profit" < doc
/mp_man.txt
> $(APPNAME
).1
91 (cd
$(MPDM
); $(MAKE
) docs
)
92 (cd
$(MPSL
); $(MAKE
) docs
)
94 distcopy
: distclean docs
95 mkdir
-p
$(DIST_TARGET
) ; \
96 tar cf
- * |
(cd
$(DIST_TARGET
) ; tar xf
-) ; \
97 (cd
$(MPDM
) ; $(MAKE
) distcopy DIST_TARGET
=$(DIST_TARGET
)/mpdm
) ; \
98 (cd
$(MPSL
) ; $(MAKE
) distcopy DIST_TARGET
=$(DIST_TARGET
)/mpsl
)
100 dist: distcopy po
/minimum-profit.pot build-mo
101 (cd
/tmp
; tar czf
- $(PROJ
)-$(VERSION
)/* ) > $(PROJ
)-$(VERSION
).
tar.gz
; \
102 rm -rf
$(DIST_TARGET
)
105 $(MAKE
) distcopy DIST_TARGET
=/tmp
/mp-midnight
106 (cd
/tmp
; tar czf
- mp-midnight
/* ) > mp-midnight.
tar.gz
; \
107 rm -rf
/tmp
/mp-midnight
112 i586-mingw32msvc-strip
$(APPNAME
)
113 install $(APPNAME
) win32
114 install mp_
*.mpsl win32
115 (DIR
=`pwd` ; cd
$(MPDM
) ; make installdoc DOCDIR
=$$DIR/win32
/doc
)
116 (DIR
=`pwd` ; cd
$(MPSL
) ; make installdoc DOCDIR
=$$DIR/win32
/doc
)
117 install $(DOCS
) win32
/doc
118 (cd win32
; aovwinstall mp-5
"Minimum Profit $(VERSION)" * doc
/*)
119 i586-mingw32msvc-strip win32
/installer.exe
120 mv win32
/installer.exe mp-
$(VERSION
).exe
124 wine ~
/.wine
/fake_windows
/Program\ Files
/Inno\ Setup\
5/ISCC.exe
/O.
/Fmp-
$(VERSION
) mp.iss
126 install: $(INSTALL_MSG
) installdoc install-mo
127 install $(APPNAME
) $(PREFIX
)/bin
/$(APPNAME
)
128 .
/mkinstalldirs
$(PREFIX
)/share
/$(APPNAME
)
129 .
/mkinstalldirs
$(PREFIX
)/share
/$(APPNAME
)/lang
130 install -m
644 mp_
*.mpsl
$(PREFIX
)/share
/$(APPNAME
)
131 install -m
644 lang
/*.mpsl
$(PREFIX
)/share
/$(APPNAME
)/lang
132 .
/mkinstalldirs
$(PREFIX
)/share
/man
/man1
133 [ -f
$(APPNAME
).1 ] && install -m
644 $(APPNAME
).1 $(PREFIX
)/share
/man
/man1
/$(APPNAME
).1 || true
136 .
/mkinstalldirs
$(PREFIX
)/share
/doc
/$(APPNAME
)
137 ( cd
$(MPDM
); $(MAKE
) installdoc
)
138 ( cd
$(MPSL
); $(MAKE
) installdoc
)
139 install -m
644 doc
/* $(PREFIX
)/share
/doc
/$(APPNAME
)
140 install -m
644 $(ADD_DOCS
) $(PREFIX
)/share
/doc
/$(APPNAME
)
141 [ -f doc
/mp_index.html
] && install -m
644 doc
/mp_index.html
$(PREFIX
)/share
/doc
/$(APPNAME
)/index.html || true
143 uninstall: uninstall-mo
144 rm -f
$(PREFIX
)/bin
/$(APPNAME
)
145 rm -rf
$(PREFIX
)/share
/$(APPNAME
)
146 rm -rf
$(PREFIX
)/share
/doc
/$(APPNAME
)
147 rm -f
$(PREFIX
)/share
/man
/man1
/$(APPNAME
).1
149 po
/minimum-profit.pot
:
150 xgettext
-o
$@
--language
=C
--keyword
=L
--keyword
=LL mp
*.c
*.mpsl
153 for a in po
/*.po
; do \
154 xgettext
--omit-header
-j
-o
$$a --language
=C \
155 --keyword
=L
--keyword
=LL mp
*.c
*.mpsl
; \
162 for i in po
/*.po
; do \
163 B
=`basename $$i .po` ; o
=po
/$$B.mo
; \
164 if
[ $$i -nt
$$o ] ; then msgfmt
-o
$$o $$i ; fi
; \
168 for a in po
/*.mo
; do \
169 B
=`basename $$a .mo` ; \
170 .
/mkinstalldirs
$(PREFIX
)/share
/locale
/$$B/LC_MESSAGES
; \
171 install -m
644 $$a $(PREFIX
)/share
/locale
/$$B/LC_MESSAGES
/minimum-profit.mo
; \
175 for a in po
/*.mo
; do \
176 B
=`basename $$a .mo` ; \
177 rm -f
$(PREFIX
)/share
/locale
/$$B/LC_MESSAGES
/minimum-profit.mo
; \
181 dpkg-buildpackage
-rfakeroot
-b
-uc
-us