/[cabestan]/Makefile
ViewVC logotype

Contents of /Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 7 - (show annotations)
Mon Oct 5 19:15:42 2009 UTC (7 years, 8 months ago) by ben
File size: 2042 byte(s)
variable speed step forward/backward
1 PRGNAME=cabestan
2 PRGTITLE=Cabestan
3 VERSION=0.2
4 PREFIX=/usr/local
5 OBJ=main.o cabestan.o about.o callbacks.o widgets.o
6 MO=fr_FR.mo
7 CFLAGS=`pkg-config --cflags glib-2.0` `pkg-config --cflags gtk+-2.0` `pkg-config --cflags jack`
8 LDFLAGS=`pkg-config --libs glib-2.0` `pkg-config --libs gtk+-2.0` `pkg-config --libs jack`
9
10 all: configure $(OBJ)
11 $(CC) -g -Wall -Wextra $(OBJ) -o $(PRGNAME) $(CFLAGS) $(LDFLAGS)
12
13 %.o: %.c
14 $(CC) -g -Wall -Wextra -c -o $@ $< $(CFLAGS)
15
16 %.mo: %.po
17 msgfmt -c -o $@ $<
18
19 configure:
20 sed -e "s#__VERSION__#$(VERSION)#" -e "s#__PRGTITLE__#$(PRGTITLE)#" -e 's#__PRGLOCALEPATH__#$(PREFIX)/share/locale#' version.h.in > version.h
21 sed -e "s#__VERSION__#$(VERSION)#" -e "s#__PRGNAME__#$(PRGNAME)#" PKGBUILD.in > PKGBUILD
22 preinstall:
23 sed -e "s#__PREFIX__#$(PREFIX)#" -e "s#__PRGTITLE__#$(PRGTITLE)#" -e "s#__PRGNAME__#$(PRGNAME)#" $(PRGNAME).desktop.in > $(PRGNAME).desktop
24
25 pot:
26 xgettext -k_ -d $(PRGNAME) -s -o $(PRGNAME).pot *.c
27
28 %.po: $(PRGNAME).pot
29 msgmerge -s -U $@ $(PRGNAME).pot
30
31 install: preinstall
32 mkdir -p $(DESTDIR)$(PREFIX)/bin
33 mkdir -p $(DESTDIR)$(PREFIX)/share/applications
34 mkdir -p $(DESTDIR)$(PREFIX)/share/icons
35 # mkdir -p $(DESTDIR)$(PREFIX)/share/locale/fr_FR/LC_MESSAGES
36
37 install $(PRGNAME) $(DESTDIR)$(PREFIX)/bin/
38 install $(PRGNAME).desktop $(DESTDIR)$(PREFIX)/share/applications/
39 cp $(PRGNAME).png $(DESTDIR)$(PREFIX)/share/icons/
40 # cp fr_FR.mo $(DESTDIR)$(PREFIX)/share/locale/fr_FR/LC_MESSAGES/$(PRGNAME).mo
41
42 uninstall:
43 $(RM) $(DESTDIR)$(PREFIX)/bin/$(PRGNAME)
44 $(RM) $(DESTDIR)$(PREFIX)/share/icons/$(PRGNAME).png
45 $(RM) $(DESTDIR)$(PREFIX)/share/applications/$(PRGNAME).desktop
46 # $(RM) $(DESTDIR)$(PREFIX)/share/locale/fr_FR/LC_MESSAGES/$(PRGNAME).mo
47
48 dist: clean
49 cd ..; cp -a $(PRGNAME) $(PRGNAME)-$(VERSION); $(RM) -r $(PRGNAME)-$(VERSION)/.git; find $(PRGNAME)-$(VERSION)/ -name ".svn" | xargs $(RM) -r ; tar zcvf $(PRGNAME)-$(VERSION).tar.gz $(PRGNAME)-$(VERSION); $(RM) -r $(PRGNAME)-$(VERSION); cd -
50
51 clean:
52 $(RM) $(PRGNAME) $(OBJ) $(MO) $(PRGNAME).desktop version.h PKGBUILD *~

  ViewVC Help
Powered by ViewVC 1.1.26