CC = gcc
CFLAGS = -DHAVE_CONFIG_H -Wall -g -I../compat -I.. -I.
LDOBJS = \
	alist.o \
	debug.o \
	error.o \
	hmap.o \
	io-utils.o \
	intparse.o \
	iterator.o \
	llist.o \
	memory.o \
	random.o \
	regex-utils.o \
	strbuf.o \
	string-utils.o \
	tab-utils.o \
	time64.o \
	tmap.o

HEADERS = \
	alist.h \
	collections.h \
	common.h \
	debug.h \
	error.h \
	hmap.h \
	io-utils.h \
	intparse.h \
	iterator.h \
	llist.h \
	memory.h \
	random.h \
	regex-utils.h \
	strbuf.h \
	string-utils.h \
	tab-utils.h \
	time64.h \
	tmap.h

.PHONY: all clean

all: lib_common.a

clean:
	rm -f *.a *.o

lib_common.a: $(LDOBJS)
	ar cru lib_common.a $(LDOBJS)

%.o: %.c $(HEADERS)
	$(CC) $(CFLAGS) -c $<
