1PREFIX ?= $(DESTDIR)/usr
2LIBDIR ?= $(PREFIX)/lib
3
4# Add your test source files here:
5SOURCES = $(sort $(wildcard *.c))
6
7###########################################################################
8
9EXECUTABLE = libsemanage-tests
10CFLAGS += -g -O0 -Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute -Wno-unused-parameter
11override CFLAGS += -I../src -I../include
12override LDLIBS += -lcunit -lbz2 -laudit -lselinux -lsepol
13
14OBJECTS = $(SOURCES:.c=.o) 
15
16all: $(EXECUTABLE) 
17
18$(EXECUTABLE): $(OBJECTS) ../src/libsemanage.a
19	$(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
20
21clean distclean: 
22	rm -rf $(OBJECTS) $(EXECUTABLE)
23
24test: all 
25	./$(EXECUTABLE)
26
27