From 1a57a98639f3c69832f9be570d446b3eae06f5aa Mon Sep 17 00:00:00 2001 From: Stefan Ritt Date: Fri, 26 Apr 2002 09:36:58 +0000 Subject: [PATCH] Added install/clean section SVN revision: 49 --- Makefile | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 8de2ce93..6f41aa38 100644 --- a/Makefile +++ b/Makefile @@ -2,27 +2,42 @@ # Simple makefile for elogd # # S. Ritt, May 12th 2000 +# install/clean section by Th. Bullinger, Apr. 26th, 2002 # # add "-DUSE_CRYPT" and "-lcrypt" to use crypt() function # CC = gcc LIBS = +CFLAGS = -march=i586 +EXECS = elog elogd +DESTDIR = /usr/local/sbin + +INSTALL=/usr/bin/install +RM=/bin/rm ifeq ($(OSTYPE),solaris) CC = gcc LIBS = -lsocket -lnsl +CFLAGS = +INSTALL = /usr/ucb/install +RM = /usr/bin/rm endif ifeq ($(OSTYPE),darwin) CC = cc endif -all: elogd elog +all: $(EXECS) elog: elog.c - $(CC) -o elog elog.c $(LIBS) + $(CC) $(CFLAGS) -o elog elog.c $(LIBS) elogd: elogd.c - $(CC) -o elogd elogd.c $(LIBS) + $(CC) $(CFLAGS) -o elogd elogd.c $(LIBS) +install: $(EXECS) + $(INSTALL) -m 0755 -o bin -g bin $(EXECS) $(DESTDIR) + +clean: + -$(RM) *~ $(EXECS)