ifndef prefix
    export prefix=$(shell cd ../..;pwd)
endif

TARGET = libpsCollections.a

all: $(TARGET)

include ../Makefile.Globals

SRC_OBJS = \
    psArray.o \
    psBitMask.o \
    psSort.o \
    psArray.o

INCLUDES = -I$(includedir)

%.o: %.c
	@echo "    Compiling $<. "
	$(CC) $(CFLAGS) -DPS_ALLOW_MALLOC $(INCLUDE_GLOBAL) $(INCLUDES) -c $< -o $@

libpsCollections.a: $(SRC_OBJS)
	$(AR) -r libpsCollections.a $(SRC_OBJS)

install: $(TARGET)
	install *.h $(includedir)
	install $(TARGET) $(libexecdir)

distclean:	clean
	$(RM) $(TARGET)

clean:
	@echo "    Deleting intermediate files for 'utilities - $(CFG)'"
	$(RM) $(SRC_OBJS) *.lint

%.lint: %.c
	splint +posixlib -exportlocal -realcompare $(INCLUDE_GLOBAL) $? > $@; cat $@ 
