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