1# Add your test source files here: 2SOURCES = $(wildcard *.c) 3 4# Point this variable to the libsemanage source directory you want to test: 5TESTSRC=../src 6 7# Add the required external object files here: 8LIBS = ../src/libsemanage.a ../../libselinux/src/libselinux.a ../../libsepol/src/libsepol.a 9 10########################################################################### 11 12EXECUTABLE = libsemanage-tests 13CC = gcc 14CFLAGS = -c -g -O0 -Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute -Wno-unused-parameter 15INCLUDE = -I$(TESTSRC) -I$(TESTSRC)/../include 16LDFLAGS = -lcunit -lustr -lbz2 -laudit 17OBJECTS = $(SOURCES:.c=.o) 18 19all: $(EXECUTABLE) 20 21$(EXECUTABLE): $(OBJECTS) 22 $(CC) $(OBJECTS) $(LIBS) $(LDFLAGS) -o $@ 23 24%.o: %.c 25 $(CC) $(CFLAGS) $(INCLUDE) $*.c -o $*.o 26 27clean distclean: 28 rm -rf $(OBJECTS) $(EXECUTABLE) 29 30test: all 31 ./$(EXECUTABLE) 32 33