# this is a UNIX Makefile

CC=gcc
CFLAGS=-I../include -DNDEBUG

AR=ar
RANLIB=ranlib

LINT=lint

RM=/bin/rm -f

SOURCES=db.c catgets.c
OBJECTS=$(SOURCES:.c=.o)

all: libs

# libs

libs: libcatdb.a

libcatdb.a: $(OBJECTS)
	$(AR) -rc $@ $(OBJECTS)
	$(RANLIB) $@


# lint

lint:
	$(LINT) $(CFLAGS) $(SOURCES)


# clean up

clean:
	-$(RM) *~ core a.out

realclean: clean
	-$(RM) $(OBJECTS)

distclean: realclean
	-$(RM) *.a
