# Include the configuration
include ../../Makefile.config

# PHONY targets
.PHONY: all clean

# Define the sources belonging to this library
sources = xmem.c xstring.c ndim_array_access.c xfile.c

# Pattern rule to generate the dependencies
include ../../Makefile.rules

# Catch empty make call
all:
	${MAKE} libutil.a

# Cleaning up
clean:
	rm -f libutil.a $(sources:.c=.o) $(sources:.c=.d)

# The library itself
libutil.a: $(sources:.c=.o)
	$(AR) -r libutil.a $(sources:.c=.o)

# Now include all objects
include $(sources:.c=.d)
