2016-12-21 18:20:59 +00:00
|
|
|
PREFIX ?= $(DESTDIR)/usr
|
|
|
|
LIBDIR ?= $(PREFIX)/lib
|
|
|
|
|
2008-08-19 19:30:36 +00:00
|
|
|
# Add your test source files here:
|
2017-05-30 14:21:32 +00:00
|
|
|
SOURCES = $(sort $(wildcard *.c))
|
2008-08-19 19:30:36 +00:00
|
|
|
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
EXECUTABLE = libsemanage-tests
|
2016-02-05 20:55:51 +00:00
|
|
|
CFLAGS += -g -O0 -Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute -Wno-unused-parameter
|
2017-06-20 15:16:41 +00:00
|
|
|
override CFLAGS += -I../src -I../include
|
2017-06-20 20:29:53 +00:00
|
|
|
override LDLIBS += -lcunit -lbz2 -laudit -lselinux -lsepol
|
2017-06-20 15:16:41 +00:00
|
|
|
|
2008-08-19 19:30:36 +00:00
|
|
|
OBJECTS = $(SOURCES:.c=.o)
|
|
|
|
|
|
|
|
all: $(EXECUTABLE)
|
|
|
|
|
2016-12-21 18:20:59 +00:00
|
|
|
$(EXECUTABLE): $(OBJECTS) ../src/libsemanage.a
|
2017-06-20 20:29:53 +00:00
|
|
|
$(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
|
2008-08-19 19:30:36 +00:00
|
|
|
|
|
|
|
clean distclean:
|
|
|
|
rm -rf $(OBJECTS) $(EXECUTABLE)
|
|
|
|
|
|
|
|
test: all
|
|
|
|
./$(EXECUTABLE)
|
|
|
|
|