/[gluid]/Makefile
ViewVC logotype

Diff of /Makefile

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 23 by ben, Sun Sep 27 14:25:45 2009 UTC revision 24 by ben, Mon Sep 28 07:18:36 2009 UTC
# Line 3  PRGTITLE=Gluid Line 3  PRGTITLE=Gluid
3  VERSION=0.4  VERSION=0.4
4  PREFIX=/usr/local  PREFIX=/usr/local
5  OBJ=gluid.o utils.o menu.o about.o callbacks.o  OBJ=gluid.o utils.o menu.o about.o callbacks.o
6    MO=fr.mo
7  CFLAGS=`pkg-config --cflags glib-2.0` `pkg-config --cflags gtk+-2.0` `pkg-config --cflags fluidsynth`  CFLAGS=`pkg-config --cflags glib-2.0` `pkg-config --cflags gtk+-2.0` `pkg-config --cflags fluidsynth`
8  LDFLAGS=`pkg-config --libs glib-2.0` `pkg-config --libs gtk+-2.0` `pkg-config --libs fluidsynth`  LDFLAGS=`pkg-config --libs glib-2.0` `pkg-config --libs gtk+-2.0` `pkg-config --libs fluidsynth`
9    
10  all: configure $(OBJ)  all: configure $(OBJ) $(MO)
11          $(CC) -g -Wall -Wextra $(OBJ) -o $(PRGNAME) $(CFLAGS) $(LDFLAGS)          $(CC) -g -Wall -Wextra $(OBJ) -o $(PRGNAME) $(CFLAGS) $(LDFLAGS)
12    
13  %.o: %.c  %.o: %.c
14          $(CC) -g -Wall -Wextra -c -o $@ $< $(CFLAGS)          $(CC) -g -Wall -Wextra -c -o $@ $< $(CFLAGS)
15    
16    %.mo: %.po
17            msgfmt -c -o $@ $<
18    
19  configure:        configure:      
20          sed -e "s#__VERSION__#$(VERSION)#" -e "s#__PRGTITLE__#$(PRGTITLE)#" version.h.in > version.h          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          sed -e "s#__VERSION__#$(VERSION)#" -e "s#__PRGNAME__#$(PRGNAME)#" PKGBUILD.in > PKGBUILD
22  data:  preinstall:
23          sed -e "s#__PREFIX__#$(PREFIX)#" -e "s#__PRGTITLE__#$(PRGTITLE)#" -e "s#__PRGNAME__#$(PRGNAME)#" $(PRGNAME).desktop.in > $(PRGNAME).desktop          sed -e "s#__PREFIX__#$(PREFIX)#" -e "s#__PRGTITLE__#$(PRGTITLE)#" -e "s#__PRGNAME__#$(PRGNAME)#" $(PRGNAME).desktop.in > $(PRGNAME).desktop
24    
25  install: data  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          mkdir -p $(DESTDIR)$(PREFIX)/bin
33          mkdir -p $(DESTDIR)$(PREFIX)/share/applications          mkdir -p $(DESTDIR)$(PREFIX)/share/applications
34          mkdir -p $(DESTDIR)$(PREFIX)/share/icons          mkdir -p $(DESTDIR)$(PREFIX)/share/icons
35            mkdir -p $(DESTDIR)$(PREFIX)/share/locale/fr/LC_MESSAGES
36    
37          install $(PRGNAME) $(DESTDIR)$(PREFIX)/bin/          install $(PRGNAME) $(DESTDIR)$(PREFIX)/bin/
38          install $(PRGNAME).desktop $(DESTDIR)$(PREFIX)/share/applications/          install $(PRGNAME).desktop $(DESTDIR)$(PREFIX)/share/applications/
39          cp $(PRGNAME).png $(DESTDIR)$(PREFIX)/share/icons/          cp $(PRGNAME).png $(DESTDIR)$(PREFIX)/share/icons/
40            cp fr.mo $(DESTDIR)$(PREFIX)/share/locale/fr/LC_MESSAGES/$(PRGNAME).mo
41    
42  uninstall:  uninstall:
43          $(RM) $(DESTDIR)$(PREFIX)/bin/$(PRGNAME)          $(RM) $(DESTDIR)$(PREFIX)/bin/$(PRGNAME)
44          $(RM) $(DESTDIR)$(PREFIX)/share/icons/$(PRGNAME).png          $(RM) $(DESTDIR)$(PREFIX)/share/icons/$(PRGNAME).png
45          $(RM) $(DESTDIR)$(PREFIX)/share/applications/$(PRGNAME).desktop          $(RM) $(DESTDIR)$(PREFIX)/share/applications/$(PRGNAME).desktop
46            $(RM) $(DESTDIR)$(PREFIX)/share/locale/fr/LC_MESSAGES/$(PRGNAME).mo
47    
48  dist: clean  dist: clean
49          cd ..; cp -a $(PRGNAME) $(PRGNAME)-$(VERSION); $(RM) -r $(PRGNAME)-$(VERSION)/.git; tar zcvf $(PRGNAME)-$(VERSION).tar.gz $(PRGNAME)-$(VERSION); $(RM) -r $(PRGNAME)-$(VERSION); cd -          cd ..; cp -a $(PRGNAME) $(PRGNAME)-$(VERSION); $(RM) -r $(PRGNAME)-$(VERSION)/.git; tar zcvf $(PRGNAME)-$(VERSION).tar.gz $(PRGNAME)-$(VERSION); $(RM) -r $(PRGNAME)-$(VERSION); cd -
50    
51  clean:  clean:
52          $(RM) $(PRGNAME) $(OBJ) $(PRGNAME).desktop version.h PKGBUILD *~          $(RM) $(PRGNAME) $(OBJ) $(MO) $(PRGNAME).desktop version.h PKGBUILD *~

Legend:
Removed from v.23  
changed lines
  Added in v.24

  ViewVC Help
Powered by ViewVC 1.1.26