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))
|
2019-06-12 08:03:54 +00:00
|
|
|
CILS = $(sort $(wildcard *.cil))
|
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
|
|
|
|
2019-06-12 08:03:54 +00:00
|
|
|
OBJECTS = $(SOURCES:.c=.o)
|
|
|
|
POLICIES = $(CILS:.cil=.policy)
|
2008-08-19 19:30:36 +00:00
|
|
|
|
2019-06-12 08:03:54 +00:00
|
|
|
all: $(EXECUTABLE) $(POLICIES)
|
2008-08-19 19:30:36 +00:00
|
|
|
|
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
|
|
|
|
2019-06-12 08:03:54 +00:00
|
|
|
%.policy: %.cil
|
|
|
|
../../secilc/secilc $*.cil -o $*.policy -f /dev/null
|
|
|
|
|
2008-08-19 19:30:36 +00:00
|
|
|
clean distclean:
|
2019-06-12 08:03:54 +00:00
|
|
|
rm -rf $(OBJECTS) $(POLICIES) $(EXECUTABLE)
|
2008-08-19 19:30:36 +00:00
|
|
|
|
|
|
|
test: all
|
|
|
|
./$(EXECUTABLE)
|
|
|
|
|