# Prototype makefile, while waiting for integration of a test framework
SRCDIR := ..
LIBS   := -lpam  -lreadline -lcrypt -laudit -lselinux
SRCST  := mailbox_addr.c
OBJST  := $(patsubst %.c,%.o,$(SRCST))
EXEST  := $(patsubst %.c,%,$(SRCST))
OBJSD  := $(addprefix $(SRCDIR)/,log.o job.o mem.o filesubs.o subs.o fcronconf.o mail.o temp_file.o env_list.o u_list.o)

CFLAGS += -I$(SRCDIR)
CFLAGS += -O2 -Wall -I/usr/include/selinux

.PHONY: clean tests

tests: $(OBJSD)
	$(CC) $(CFLAGS) $(OBJSD) $(LIBS) $(SRCST) -o $(EXEST)
	./$(EXEST)

clean:
	rm -f *.o core $(EXEST)
