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


1.5
date	95.09.27.14.40.32;	author seth;	state Exp;
branches;
next	1.4;

1.4
date	95.09.27.14.30.05;	author seth;	state Exp;
branches;
next	1.3;

1.3
date	95.09.26.20.18.00;	author seth;	state Exp;
branches;
next	1.2;

1.2
date	95.09.13.16.02.30;	author seth;	state Exp;
branches;
next	1.1;

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


desc
@@


1.5
log
@Break out link.c line for other than NeXT
@
text
@######################################################################
#
# Define BAD_FLOAT if you are unfortunate enough to not use
# gcc and thus don't have a proper float.h
#
# BAD_FLOAT = -DBad_float_h

########################################
## NeXT variables
# CFLAGS = -g -O -I. $(BAD_FLOAT)
# LDFLAGS = -Xlinker -m
# AR = libtool
# ARFLAGS = -o
# CC = cc
# RANLIB = :
########################################

########################################
## Non- Sun make or GNU make
# LINK.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
########################################

########################################
# Everyone else's variables
CFLAGS = -g -O -I. $(BAD_FLOAT)
CC = gcc
RANLIB = ranlib
########################################

TARGETS=libnewlog.a syslogerr syslogerr-fix test-snprintf
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) $@@ $(OBJ)
	$(RANLIB) $@@ || true

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

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

test-snprintf: test-snprintf.c libnewlog.a
	$(CC) -g -o $@@ $@@.c -L. -lnewlog

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

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
@


1.4
log
@Bad_float info
@
text
@a13 1
# LINK.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
d16 5
@


1.3
log
@CERT provided portability fix
@
text
@d2 7
d10 1
a10 1
# CFLAGS = -g -O -I.
d17 1
d19 1
a19 1
######################################################################
d21 1
a21 1
CFLAGS = -g -O -I.
d24 1
@


1.2
log
@NeXT changes
@
text
@d17 1
a17 1
TARGETS=libnewlog.a syslogerr syslogerr-fix
d39 2
d43 1
a43 1
	$(RM) core *~ $(TARGETS) *.a *.o syslogerr syslogerr-fix
@


1.1
log
@Initial revision
@
text
@d1 13
d15 2
a16 1
CFLAGS = -g -O -I.
a17 1
RANLIB=ranlib
d30 1
a30 1
	$(AR) $(ARFLAGS) $@@ $?
d33 1
a33 1
syslogerr:
d36 1
a36 1
syslogerr-fix:
@
