From 33a2beccc9879a6e6338f6b9090ca08e75bd3563 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Tue, 25 Oct 2005 02:30:56 +0000 Subject: [PATCH] Added installation rules --- Makefile | 4 +++- src/Makefile | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 61661c9..43c7c47 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ PACKAGE = configure -VERSION = 0.0.1 +VERSION = 0.0.2 SUBDIRS = src TAR = tar cfzv @@ -22,3 +22,5 @@ dist: distclean src/Makefile \ project.conf \ Makefile +install: all + @for i in $(SUBDIRS); do (cd $$i && $(MAKE) install) || exit; done diff --git a/src/Makefile b/src/Makefile index daa599e..3219b21 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,9 +1,14 @@ TARGETS = configure +PREFIX = /usr/local +DESTDIR = +BINDIR = $(PREFIX)/bin CC = cc CFLAGSF = -W -Wall -ansi -I /System/Include CFLAGS = -g LDFLAGSF= -L /System/Libraries -l System -l dl RM = rm -f +MKDIR = mkdir -p +INSTALL = install all: $(TARGETS) @@ -21,3 +26,6 @@ clean: distclean: clean $(RM) $(TARGETS) +install: all + $(MKDIR) $(DESTDIR)$(BINDIR) + $(INSTALL) -m 0755 configure $(DESTDIR)$(BINDIR)/configure