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

NAME=io

# PHONY targets
.PHONY: all clean

# Define the sources belonging to this library
sources = io_file.c \
          io_gadget_header.c \
          io_mgadget.c \
          io_gadget.c \
          io_logging.c \
          io_util.c

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

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

# Cleaning up
clean:
	rm -f lib${NAME}.a $(sources:.c=.o) $(sources:.c=.d)

# The library itself
lib${NAME}.a: $(sources:.c=.o)
	$(AR) -r lib${NAME}.a $(sources:.c=.o)

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