Description: Simplify building by creating main Makefile and install target for src/Makefile
Author: Pjotr Prins <pjotr.debian@thebird.nl>
Date: Tue, 07 Sep 2010 21:09:02 +0200

--- /dev/null
+++ paml4.5/Makefile
@@ -0,0 +1,9 @@
+
+all install build:
+	echo "Executing make $@ in src directory, instead."
+	make -C src $@
+
+clean:
+	echo "Cleaning binaries"
+	rm -f $(find src -name "*.c" | sed -e 's/.c$//')
+
--- paml4.5.orig/src/Makefile
+++ paml4.5/src/Makefile
@@ -35,3 +35,11 @@
 	$(CC) $(CFLAGS) -o $@ yn00.c tools.c $(LIBS)
 chi2 : chi2.c
 	$(CC) $(CFLAGS) -o $@ chi2.c $(LIBS)
+
+PREFIX=/usr
+DESTDIR=/
+
+install:
+	if [ ! -d "$(DESTDIR)/$(PREFIX)/bin" ]; then mkdir -p "$(DESTDIR)/$(PREFIX)/bin"; fi
+	cp $(PRGS) $(DESTDIR)/$(PREFIX)/bin/
+
