head	1.1;
access;
symbols;
locks; strict;
comment	@# @;


1.1
date	95.09.01.18.56.37;	author seth;	state Exp;
branches;
next	;


desc
@@


1.1
log
@Initial revision
@
text
@CC = gcc
CFLAGS = -g -O -I.
TARGETS=libnewlog.a syslogerr syslogerr-fix
RANLIB=ranlib
DESTLIB=/usr/local/lib
DESTINC=/usr/local/include
PERM=644
INSTALL=install

SRCS = snprintf.c vsnprintf.c syslog.c fvwrite.c strerror.c strtod.c vfprintf.c

OBJ = $(SRCS:.c=.o)

all: $(TARGETS)

libnewlog.a: $(OBJ)
	$(AR) $(ARFLAGS) $@@ $?
	$(RANLIB) $@@ || true

syslogerr:
	$(LINK.c) -o $@@ $@@.c

syslogerr-fix:
	$(LINK.c) -o $@@ syslogerr.c -L. -lnewlog


clean:
	$(RM) core *~ $(TARGETS) *.a *.o syslogerr syslogerr-fix

install: $(TARGETS)
	$(INSTALL) -m $(PERM) libnewlog.a $(DESTLIB)
	$(RANLIB) $(DESTLIB)/libnewlog.a || true
#	$(INSTALL) -m $(PERM) $(INCFILES) $(DESTINC)
#	mkdir -p $(DESTINC)/sys
#	$(INSTALL) -m $(PERM) $(SYSINCFILES) $(DESTINC)/sys
@
