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