[xiph-commits] r12859 - experimental/giles/rogg

giles at svn.xiph.org giles at svn.xiph.org
Sat Apr 14 00:30:36 PDT 2007


Author: giles
Date: 2007-04-14 00:30:36 -0700 (Sat, 14 Apr 2007)
New Revision: 12859

Modified:
   experimental/giles/rogg/Makefile
Log:
Add basic support for the conventional check, dist, install, uninstall 
makefile targets. 


Modified: experimental/giles/rogg/Makefile
===================================================================
--- experimental/giles/rogg/Makefile	2007-04-13 11:47:09 UTC (rev 12858)
+++ experimental/giles/rogg/Makefile	2007-04-14 07:30:36 UTC (rev 12859)
@@ -1,5 +1,10 @@
 # simple Makefile for rogg and related utilities
 
+PACKAGE = rogg
+VERSION = 0.1
+
+prefix = /usr/local
+
 OPTS = -g -O2 -Wall
 
 rogg_UTILS = rogg_pagedump rogg_eosfix rogg_aspect
@@ -19,10 +24,33 @@
 rogg_aspect : rogg_aspect.o librogg.a
 	$(CC) $(CFLAGS) -o $@ $^
 
+check : all
+
 clean :
 	-rm -f $(rogg_UTILS)
 	-rm -f librogg.a
 	-rm -f *.o
 
+.PHONY : all check clean install uninstall dist
+
 .c.o :
 	$(CC) $(OPTS) $(CFLAGS) -I. -c $<
+
+install : all
+	cp librogg.a $(prefix)/lib/
+	cp rogg.h $(prefix)/include/
+	cp $(rogg_UTILS) $(prefix)/bin/
+
+uninstall : 
+	-rm -f $(prefix)/lib/librogg.a
+	-rm -f $(prefix)/include/rogg.h
+	-for util in $(rogg_UTILS); do rm -f $(prefix)/bin/$$util; done
+
+distdir = $(PACKAGE)-$(VERSION)
+dist : *.c *.h Makefile
+	if test -d $(distdir); then rm -rf $(distdir); fi
+	-rm -rf $(PACKAGE)-$(VERSION)
+	mkdir $(distdir)
+	cp *.c *.h Makefile $(distdir)/
+	tar czf $(distdir).tar.gz $(distdir)
+	rm -rf $(distdir)



More information about the commits mailing list