/[gluid]/Makefile
ViewVC logotype

Contents of /Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (show annotations)
Fri Sep 25 18:47:59 2009 UTC (12 years, 2 months ago) by ben
File size: 1550 byte(s)
first commit, version 0.1 working (basic)
1 PRGNAME=gluid
2 PRGTITLE=Gluid
3 VERSION=0.1
4 PREFIX=/usr/local
5 OBJ=gluid.o controller.o menu.o about.o callbacks.o
6 CFLAGS=`pkg-config --cflags glib-2.0` `pkg-config --cflags gtk+-2.0` `pkg-config --cflags fluidsynth`
7 LDFLAGS=`pkg-config --libs glib-2.0` `pkg-config --libs gtk+-2.0` `pkg-config --libs fluidsynth`
8
9 all: configure $(OBJ)
10 $(CC) -g -Wall -Wextra $(OBJ) -o $(PRGNAME) $(CFLAGS) $(LDFLAGS)
11
12 %.o: %.c
13 $(CC) -g -Wall -Wextra -c -o $@ $< $(CFLAGS)
14
15 configure:
16 sed -e "s#__VERSION__#$(VERSION)#" -e "s#__PRGTITLE__#$(PRGTITLE)#" version.h.in > version.h
17 sed -e "s#__VERSION__#$(VERSION)#" -e "s#__PRGNAME__#$(PRGNAME)#" PKGBUILD.in > PKGBUILD
18 data:
19 sed -e "s#__PREFIX__#$(PREFIX)#" -e "s#__PRGTITLE__#$(PRGTITLE)#" -e "s#__PRGNAME__#$(PRGNAME)#" $(PRGNAME).desktop.in > $(PRGNAME).desktop
20
21 install: data
22 mkdir -p $(DESTDIR)$(PREFIX)/bin
23 mkdir -p $(DESTDIR)$(PREFIX)/share/applications
24 mkdir -p $(DESTDIR)$(PREFIX)/share/icons
25
26 install $(PRGNAME) $(DESTDIR)$(PREFIX)/bin/
27 install $(PRGNAME).desktop $(DESTDIR)$(PREFIX)/share/applications/
28 cp $(PRGNAME).png $(DESTDIR)$(PREFIX)/share/icons/
29
30 uninstall:
31 $(RM) $(DESTDIR)$(PREFIX)/bin/$(PRGNAME)
32 $(RM) $(DESTDIR)$(PREFIX)/share/icons/$(PRGNAME).png
33 $(RM) $(DESTDIR)$(PREFIX)/share/applications/$(PRGNAME).desktop
34
35 dist: clean
36 cd ..; cp -a $(PRGNAME) $(PRGNAME)-$(VERSION); $(RM) -r $(PRGNAME)-$(VERSION)/.git; tar zcvf $(PRGNAME)-$(VERSION).tar.gz $(PRGNAME)-$(VERSION); $(RM) -r $(PRGNAME)-$(VERSION); cd -
37
38 clean:
39 $(RM) $(PRGNAME) $(OBJ) $(PRGNAME).desktop version.h PKGBUILD *~

  ViewVC Help
Powered by ViewVC 1.1.26