Debian Codegraph @

Makefile

raw symbols ◀ ▶ SCIP
3 Debian patches touch this file
1 # ebook2cw Makefile -- Fabian Kurz, DJ5CW -- http://fkurz.net/ham/ebook2cw.html
2
3 VERSION=0.8.5
•4 ROOT_DESTDIR?=/usr
5 override DESTDIR:=$(DESTDIR)$(ROOT_DESTDIR)
6
7 # Set to NO to compile without Lame/Ogg-vorbis support
8 USE_LAME?=YES
9 USE_OGG?=YES
10
•11 INSTALL?=install
12 CFLAGS:=$(CFLAGS) -D DESTDIR=\"$(ROOT_DESTDIR)\" -D VERSION=\"$(VERSION)\"
13
14 ifeq ($(USE_LAME), YES)
15 CFLAGS:=$(CFLAGS) -D LAME
16 LDFLAGS:=$(LDFLAGS) -lmp3lame
17 endif
18 ifeq ($(USE_OGG), YES)
19 CFLAGS:=$(CFLAGS) -D OGGV
20 LDFLAGS:=$(LDFLAGS) -lvorbis -lvorbisenc -logg
21 endif
22
23 UNAME := $(shell uname)
24
25 ifeq ($(UNAME), Darwin)
26 LDFLAGS += -lintl
27 endif
28
29 all: ebook2cw
30
31 ebook2cw: ebook2cw.c codetables.h
32 $(CC) ebook2cw.c -pedantic -Wall -Wno-format-truncation -lm $(LDFLAGS) $(CFLAGS) -o ebook2cw
33 msgfmt -o po/de.mo po/de.po
34
35 cgi: ebook2cw.c codetables.h
36 $(CC) -static ebook2cw.c $(LDFLAGS) -lm $(CFLAGS) -D CGI -o cw.cgi
37
38 cgibuffered: ebook2cw.c codetables.h
39 $(CC) -static ebook2cw.c $(LDFLAGS) -lm $(CFLAGS) -D CGI -D CGIBUFFERED -o cw.cgi
40
41 static:
42 $(CC) -static ebook2cw.c $(LDFLAGS) -lm $(CFLAGS) -o ebook2cw
43
44 install:
•45 $(INSTALL) -d -v $(DESTDIR)/share/man/man1/
46 $(INSTALL) -d -v $(DESTDIR)/bin/
47 $(INSTALL) -d -v $(DESTDIR)/share/doc/ebook2cw/
48 $(INSTALL) -d -v $(DESTDIR)/share/doc/ebook2cw/examples/
49 $(INSTALL) -d -v $(DESTDIR)/share/locale/de/LC_MESSAGES/
50 $(INSTALL) -s -m 0755 ebook2cw $(DESTDIR)/bin/
51 $(INSTALL) -m 0644 ebook2cw.1 $(DESTDIR)/share/man/man1/
52 $(INSTALL) -m 0644 README $(DESTDIR)/share/doc/ebook2cw/
53 $(INSTALL) -m 0644 ebook2cw.conf $(DESTDIR)/share/doc/ebook2cw/examples/
54 $(INSTALL) -m 0644 isomap.txt $(DESTDIR)/share/doc/ebook2cw/examples/
55 $(INSTALL) -m 0644 utf8map.txt $(DESTDIR)/share/doc/ebook2cw/examples/
56 $(INSTALL) -m 0644 po/de.mo $(DESTDIR)/share/locale/de/LC_MESSAGES/ebook2cw.mo
57
58 uninstall:
59 rm -f $(DESTDIR)/bin/ebook2cw
60 rm -f $(DESTDIR)/share/man/man1/ebook2cw.1
61 rm -rf $(DESTDIR)/share/doc/ebook2cw
62
63 clean:
64 rm -f ebook2cw *~ *.mp3 *.ogg *.cgi ebook2cw.exe po/*.mo
65
66 dist:
67 sed 's/v[0-9].[0-9].[0-9]/v$(VERSION)/g' README > README2
68 rm -f README
69 mv README2 README
70 rm -f releases/ebook2cw-$(VERSION).tar.gz
71 rm -rf releases/ebook2cw-$(VERSION)
72 mkdir ebook2cw-$(VERSION)
73 mkdir ebook2cw-$(VERSION)/po
74 cp ebook2cw.c codetables.h ChangeLog ebook2cw.1 \
75 ebook2cw.conf isomap.txt utf8map.txt \
76 ebook2cw.bat \
77 README COPYING Makefile ebook2cw-$(VERSION)
78 cp po/*.po ebook2cw-$(VERSION)/po
79 tar -zcf ebook2cw-$(VERSION).tar.gz ebook2cw-$(VERSION)
80 mv ebook2cw-$(VERSION) releases/
81 mv ebook2cw-$(VERSION).tar.gz releases/
82 md5sum releases/*.gz > releases/md5sums.txt
83 chmod a+r releases/*
84