/[axel]/trunk/Makefile
ViewVC logotype

Contents of /trunk/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4 - (show annotations) (download)
Fri Jan 11 12:03:59 2008 UTC (5 years, 4 months ago) by appaji-guest
File size: 1851 byte(s)
Import 1.0b
1 ###########################
2 ## Makefile for Axel ##
3 ## ##
4 ## Copyright 2001 Lintux ##
5 ###########################
6
7
8 ### DEFINITIONS
9
10 -include Makefile.settings
11
12 .SUFFIXES: .po .mo
13
14 # Add your translation here..
15 MOFILES = nl.mo de.mo
16
17
18 all: $(OUTFILE)
19 install: install-bin install-etc install-man
20 uninstall: uninstall-bin uninstall-etc uninstall-man
21
22 ifdef I18N
23 all: $(MOFILES)
24 install: install-i18n
25 uninstall: uninstall-i18n
26 endif
27
28 clean:
29 rm -f *.o $(OUTFILE) search core *.mo
30
31 distclean: clean
32 rm -f Makefile.settings config.h
33
34 install-man:
35 mkdir -p $(DESTDIR)$(MANDIR)/man1/
36 cp axel.1 $(DESTDIR)$(MANDIR)/man1/axel.1
37
38 uninstall-man:
39 rm -f $(MANDIR)/man1/axel.1
40
41 install-etc:
42 mkdir -p $(DESTDIR)$(ETCDIR)/
43 cp axelrc.example $(DESTDIR)$(ETCDIR)/axelrc
44
45 uninstall-etc:
46 rm -f $(ETCDIR)/axelrc
47
48 ### MAIN PROGRAM
49
50 $(OUTFILE): axel.o conf.o conn.o ftp.o http.o search.o tcp.o text.o
51 $(CC) axel.o conf.o conn.o ftp.o http.o search.o tcp.o text.o -o $(OUTFILE) $(LFLAGS)
52 ifndef DEBUG
53 -$(STRIP) $(OUTFILE)
54 endif
55
56 .c.o:
57 $(CC) -c $*.c -o $*.o -Wall $(CFLAGS)
58
59 install-bin:
60 mkdir -p $(DESTDIR)$(BINDIR)/
61 cp $(OUTFILE) $(DESTDIR)$(BINDIR)/$(OUTFILE)
62
63 uninstall-bin:
64 rm -f $(BINDIR)/$(OUTFILE)
65
66 tar: distclean
67 x=`pwd | sed -e 's/\/.*\///'`; \
68 cd ..; \
69 tar czf $$x.tar.gz $$x
70
71
72 ### I18N FILES
73
74 %.po:
75 -@mv $@ $@.bak
76 xgettext -k_ -o$@ *.[ch]
77 @if [ -e $@.bak ]; then \
78 echo -n Merging files...; \
79 msgmerge -vo $@.combo $@.bak $@; \
80 rm -f $@ $@.bak; \
81 mv $@.combo $@; \
82 fi
83
84 .po.mo: $@.po
85 msgfmt -vo $@ $*.po
86
87 install-i18n:
88 @echo Installing locale files...
89 @for i in $(MOFILES); do \
90 mkdir -p $(DESTDIR)$(LOCALE)/`echo $$i | cut -d. -f1`/LC_MESSAGES/; \
91 cp $$i $(DESTDIR)$(LOCALE)/`echo $$i | cut -d. -f1`/LC_MESSAGES/axel.mo; \
92 done
93
94 uninstall-i18n:
95 cd $(LOCALE); find . -name axel.mo -exec 'rm' '{}' ';'

  ViewVC Help
Powered by ViewVC 1.1.5