/[axel]/trunk/Makefile
ViewVC logotype

Contents of /trunk/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 118 - (show annotations) (download)
Wed Jan 6 12:40:49 2010 UTC (3 years, 4 months ago) by phihag-guest
File size: 2279 byte(s)
Add HP-UX, fix Solaris support (Fixes: #312092)
1 ###########################
2 ## Makefile for Axel ##
3 ## ##
4 ## Copyright 2001 Lintux ##
5 ###########################
6
7 ### DEFINITIONS
8
9 -include Makefile.settings
10
11 .SUFFIXES: .po .mo
12
13 # Add your translation here..
14 MOFILES = nl.mo de.mo ru.mo zh_CN.mo
15
16
17 all: $(OUTFILE)
18 install: install-bin install-etc install-man
19 uninstall: uninstall-bin uninstall-etc uninstall-man
20
21 clean:
22 rm -f *.o $(OUTFILE) search core *.mo
23
24 distclean: clean
25 rm -f Makefile.settings config.h axel-*.tar axel-*.tar.gz axel-*.tar.bz2
26
27 install-man:
28 mkdir -p $(DESTDIR)$(MANDIR)/man1/
29 cp axel.1 $(DESTDIR)$(MANDIR)/man1/axel.1
30 mkdir -p $(DESTDIR)$(MANDIR)/zh_CN/man1/
31 cp axel_zh_CN.1 $(DESTDIR)$(MANDIR)/zh_CN/man1/axel.1
32
33 uninstall-man:
34 rm -f $(MANDIR)/man1/axel.1
35 rm -f $(MANDIR)/zh_CN/man1/axel.1
36
37 install-etc:
38 mkdir -p $(DESTDIR)$(ETCDIR)/
39 cp axelrc.example $(DESTDIR)$(ETCDIR)/axelrc
40
41 uninstall-etc:
42 rm -f $(ETCDIR)/axelrc
43
44 ### MAIN PROGRAM
45
46 $(OUTFILE): axel.o conf.o conn.o ftp.o http.o search.o tcp.o text.o
47 $(CC) *.o -o $(OUTFILE) $(LFLAGS)
48 $(STRIP) $(OUTFILE)
49
50 .c.o:
51 $(CC) -c $*.c -o $*.o $(CFLAGS)
52
53 install-bin:
54 mkdir -p $(DESTDIR)$(BINDIR)/
55 cp $(OUTFILE) $(DESTDIR)$(BINDIR)/$(OUTFILE)
56
57 uninstall-bin:
58 rm -f $(BINDIR)/$(OUTFILE)
59
60 tar:
61 version=`sed -n 's/#define AXEL_VERSION_STRING[ \t]*"\([^"]*\)"/\1/p' < axel.h` && \
62 tar --create --numeric-owner --owner 0 --group 0 --transform "s#^#axel-$${version}/#" "--file=axel-$${version}.tar" --exclude-vcs -- *.c *.h *.po *.1 configure Makefile axelrc.example gui API CHANGES COPYING CREDITS README && \
63 gzip --best < "axel-$${version}.tar" > "axel-$${version}.tar.gz" && \
64 bzip2 --best < "axel-$${version}.tar" > "axel-$${version}.tar.bz2"
65
66
67 ### I18N FILES
68
69 %.po:
70 -@mv $@ $@.bak
71 xgettext -k_ -o$@ *.[ch]
72 @if [ -e $@.bak ]; then \
73 echo -n Merging files...; \
74 msgmerge -vo $@.combo $@.bak $@; \
75 rm -f $@ $@.bak; \
76 mv $@.combo $@; \
77 fi
78
79 .po.mo: $@.po
80 msgfmt -vo $@ $*.po
81
82 i18n-mofiles: $(MOFILES)
83
84 install-i18n:
85 @echo Installing locale files...
86 @for i in $(MOFILES); do \
87 mkdir -p $(DESTDIR)$(LOCALE)/`echo $$i | cut -d. -f1`/LC_MESSAGES/; \
88 cp $$i $(DESTDIR)$(LOCALE)/`echo $$i | cut -d. -f1`/LC_MESSAGES/axel.mo; \
89 done
90
91 uninstall-i18n:
92 cd $(LOCALE); find . -name axel.mo -exec 'rm' '{}' ';'

  ViewVC Help
Powered by ViewVC 1.1.5