1*2d543d20SAndroid Build Coastguard Worker# 2*2d543d20SAndroid Build Coastguard Worker# Makefile for building the dispol program 3*2d543d20SAndroid Build Coastguard Worker# 4*2d543d20SAndroid Build Coastguard WorkerCFLAGS ?= -g -Wall -W -Werror -O2 5*2d543d20SAndroid Build Coastguard Worker 6*2d543d20SAndroid Build Coastguard Worker# If no specific libsepol.a is specified, fall back on LDFLAGS search path 7*2d543d20SAndroid Build Coastguard Worker# Otherwise, as $(LIBSEPOLA) already appears in the dependencies, there 8*2d543d20SAndroid Build Coastguard Worker# is no need to define a value for LDLIBS_LIBSEPOLA 9*2d543d20SAndroid Build Coastguard Workerifeq ($(LIBSEPOLA),) 10*2d543d20SAndroid Build Coastguard Worker LDLIBS_LIBSEPOLA := -l:libsepol.a 11*2d543d20SAndroid Build Coastguard Workerendif 12*2d543d20SAndroid Build Coastguard Worker 13*2d543d20SAndroid Build Coastguard Workerall: dispol dismod 14*2d543d20SAndroid Build Coastguard Worker 15*2d543d20SAndroid Build Coastguard Workerdispol: dispol.o $(LIBSEPOLA) 16*2d543d20SAndroid Build Coastguard Worker $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS_LIBSEPOLA) 17*2d543d20SAndroid Build Coastguard Worker 18*2d543d20SAndroid Build Coastguard Workerdismod: dismod.o $(LIBSEPOLA) 19*2d543d20SAndroid Build Coastguard Worker $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS_LIBSEPOLA) 20*2d543d20SAndroid Build Coastguard Worker 21*2d543d20SAndroid Build Coastguard Workerclean: 22*2d543d20SAndroid Build Coastguard Worker -rm -f dispol dismod *.o 23