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:
|
|
|
|
SOURCES = $(wildcard *.c)
|
|
|
|
|
|
|
|
# Add the required external object files here:
|
2016-12-21 18:20:59 +00:00
|
|
|
LIBS = ../src/libsemanage.a -L$(LIBDIR) -lselinux -lsepol
|
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
|
2016-12-21 18:20:59 +00:00
|
|
|
INCLUDE = -I../src -I../include
|
2016-12-21 18:21:04 +00:00
|
|
|
LDFLAGS += -lcunit -lbz2 -laudit
|
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
|
2008-08-19 19:30:36 +00:00
|
|
|
$(CC) $(OBJECTS) $(LIBS) $(LDFLAGS) -o $@
|
|
|
|
|
|
|
|
%.o: %.c
|
2016-02-05 20:55:51 +00:00
|
|
|
$(CC) $(CFLAGS) $(INCLUDE) -c $*.c -o $*.o
|
2008-08-19 19:30:36 +00:00
|
|
|
|
|
|
|
clean distclean:
|
|
|
|
rm -rf $(OBJECTS) $(EXECUTABLE)
|
|
|
|
|
|
|
|
test: all
|
|
|
|
./$(EXECUTABLE)
|
|
|
|
|