xref: /aosp_15_r20/external/selinux/libselinux/src/Makefile (revision 2d543d20722ada2425b5bdab9d0d1d29470e7bba)
1*2d543d20SAndroid Build Coastguard Worker# Support building the Python bindings multiple times, against various Python
2*2d543d20SAndroid Build Coastguard Worker# runtimes (e.g. Python 2 vs Python 3) by optionally prefixing the build
3*2d543d20SAndroid Build Coastguard Worker# targets with "PYPREFIX":
4*2d543d20SAndroid Build Coastguard WorkerPYTHON ?= python3
5*2d543d20SAndroid Build Coastguard WorkerPYPREFIX ?= $(shell $(PYTHON) -c 'import sys;print("python-%d.%d" % sys.version_info[:2])')
6*2d543d20SAndroid Build Coastguard WorkerRUBY ?= ruby
7*2d543d20SAndroid Build Coastguard WorkerRUBYPREFIX ?= $(notdir $(RUBY))
8*2d543d20SAndroid Build Coastguard WorkerPKG_CONFIG ?= pkg-config
9*2d543d20SAndroid Build Coastguard Worker
10*2d543d20SAndroid Build Coastguard Worker# Installation directories.
11*2d543d20SAndroid Build Coastguard WorkerPREFIX ?= /usr
12*2d543d20SAndroid Build Coastguard WorkerLIBDIR ?= $(PREFIX)/lib
13*2d543d20SAndroid Build Coastguard WorkerSHLIBDIR ?= /lib
14*2d543d20SAndroid Build Coastguard WorkerINCLUDEDIR ?= $(PREFIX)/include
15*2d543d20SAndroid Build Coastguard WorkerPYINC ?= $(shell $(PKG_CONFIG) --cflags $(PYPREFIX))
16*2d543d20SAndroid Build Coastguard WorkerPYLIBS ?= $(shell $(PKG_CONFIG) --libs $(PYPREFIX))
17*2d543d20SAndroid Build Coastguard WorkerPYTHONLIBDIR ?= $(shell $(PYTHON) -c "import sysconfig; print(sysconfig.get_path('platlib', vars={'platbase': '$(PREFIX)', 'base': '$(PREFIX)'}))")
18*2d543d20SAndroid Build Coastguard WorkerPYCEXT ?= $(shell $(PYTHON) -c 'import importlib.machinery;print(importlib.machinery.EXTENSION_SUFFIXES[0])')
19*2d543d20SAndroid Build Coastguard WorkerRUBYINC ?= $(shell $(RUBY) -e 'puts "-I" + RbConfig::CONFIG["rubyarchhdrdir"] + " -I" + RbConfig::CONFIG["rubyhdrdir"]')
20*2d543d20SAndroid Build Coastguard WorkerRUBYLIBS ?= $(shell $(RUBY) -e 'puts "-L" + RbConfig::CONFIG["libdir"] + " -L" + RbConfig::CONFIG["archlibdir"] + " " + RbConfig::CONFIG["LIBRUBYARG_SHARED"]')
21*2d543d20SAndroid Build Coastguard WorkerRUBYINSTALL ?= $(shell $(RUBY) -e 'puts RbConfig::CONFIG["vendorarchdir"]')
22*2d543d20SAndroid Build Coastguard Worker
23*2d543d20SAndroid Build Coastguard WorkerVERSION = $(shell cat ../VERSION)
24*2d543d20SAndroid Build Coastguard WorkerLIBVERSION = 1
25*2d543d20SAndroid Build Coastguard Worker
26*2d543d20SAndroid Build Coastguard WorkerOS ?= $(shell uname)
27*2d543d20SAndroid Build Coastguard Worker
28*2d543d20SAndroid Build Coastguard Workerifeq ($(shell $(CC) -v 2>&1 | grep "clang"),)
29*2d543d20SAndroid Build Coastguard WorkerCOMPILER ?= gcc
30*2d543d20SAndroid Build Coastguard Workerelse
31*2d543d20SAndroid Build Coastguard WorkerCOMPILER ?= clang
32*2d543d20SAndroid Build Coastguard Workerendif
33*2d543d20SAndroid Build Coastguard Worker
34*2d543d20SAndroid Build Coastguard WorkerLIBA=libselinux.a
35*2d543d20SAndroid Build Coastguard WorkerTARGET=libselinux.so
36*2d543d20SAndroid Build Coastguard WorkerLIBPC=libselinux.pc
37*2d543d20SAndroid Build Coastguard WorkerSWIGIF= selinuxswig_python.i selinuxswig_python_exception.i
38*2d543d20SAndroid Build Coastguard WorkerSWIGRUBYIF= selinuxswig_ruby.i
39*2d543d20SAndroid Build Coastguard WorkerSWIGCOUT= selinuxswig_python_wrap.c
40*2d543d20SAndroid Build Coastguard WorkerSWIGPYOUT= selinux.py
41*2d543d20SAndroid Build Coastguard WorkerSWIGRUBYCOUT= selinuxswig_ruby_wrap.c
42*2d543d20SAndroid Build Coastguard WorkerSWIGLOBJ:= $(patsubst %.c,$(PYPREFIX)%.lo,$(SWIGCOUT))
43*2d543d20SAndroid Build Coastguard WorkerSWIGRUBYLOBJ:= $(patsubst %.c,%.lo,$(SWIGRUBYCOUT))
44*2d543d20SAndroid Build Coastguard WorkerSWIGSO=$(PYPREFIX)_selinux.so
45*2d543d20SAndroid Build Coastguard WorkerSWIGFILES=$(SWIGSO) $(SWIGPYOUT)
46*2d543d20SAndroid Build Coastguard WorkerSWIGRUBYSO=$(RUBYPREFIX)_selinux.so
47*2d543d20SAndroid Build Coastguard WorkerLIBSO=$(TARGET).$(LIBVERSION)
48*2d543d20SAndroid Build Coastguard WorkerAUDIT2WHYLOBJ=$(PYPREFIX)audit2why.lo
49*2d543d20SAndroid Build Coastguard WorkerAUDIT2WHYSO=$(PYPREFIX)audit2why.so
50*2d543d20SAndroid Build Coastguard Worker
51*2d543d20SAndroid Build Coastguard Worker# If no specific libsepol.a is specified, fall back on LDFLAGS search path
52*2d543d20SAndroid Build Coastguard Worker# Otherwise, as $(LIBSEPOLA) already appears in the dependencies, there
53*2d543d20SAndroid Build Coastguard Worker# is no need to define a value for LDLIBS_LIBSEPOLA
54*2d543d20SAndroid Build Coastguard Workerifeq ($(LIBSEPOLA),)
55*2d543d20SAndroid Build Coastguard Worker        LDLIBS_LIBSEPOLA := -l:libsepol.a
56*2d543d20SAndroid Build Coastguard Workerendif
57*2d543d20SAndroid Build Coastguard Worker
58*2d543d20SAndroid Build Coastguard WorkerGENERATED=$(SWIGCOUT) $(SWIGRUBYCOUT) $(SWIGCOUT) selinuxswig_python_exception.i
59*2d543d20SAndroid Build Coastguard WorkerSRCS= $(filter-out $(GENERATED) audit2why.c, $(sort $(wildcard *.c)))
60*2d543d20SAndroid Build Coastguard Worker
61*2d543d20SAndroid Build Coastguard WorkerMAX_STACK_SIZE=32768
62*2d543d20SAndroid Build Coastguard Worker
63*2d543d20SAndroid Build Coastguard Workerifeq ($(COMPILER), gcc)
64*2d543d20SAndroid Build Coastguard WorkerEXTRA_CFLAGS = -Wlogical-op -Wpacked-bitfield-compat -Wsync-nand \
65*2d543d20SAndroid Build Coastguard Worker	-Wcoverage-mismatch -Wcpp -Wformat-contains-nul -Wnormalized=nfc -Wsuggest-attribute=const \
66*2d543d20SAndroid Build Coastguard Worker	-Wsuggest-attribute=noreturn -Wsuggest-attribute=pure -Wtrampolines -Wjump-misses-init \
67*2d543d20SAndroid Build Coastguard Worker	-Wno-suggest-attribute=pure -Wno-suggest-attribute=const -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 \
68*2d543d20SAndroid Build Coastguard Worker	-Wstrict-overflow=5 -fno-semantic-interposition
69*2d543d20SAndroid Build Coastguard Workerelse
70*2d543d20SAndroid Build Coastguard WorkerEXTRA_CFLAGS = -Wunused-command-line-argument
71*2d543d20SAndroid Build Coastguard Workerendif
72*2d543d20SAndroid Build Coastguard Worker
73*2d543d20SAndroid Build Coastguard WorkerOBJS= $(patsubst %.c,%.o,$(SRCS))
74*2d543d20SAndroid Build Coastguard WorkerLOBJS= $(patsubst %.c,%.lo,$(SRCS))
75*2d543d20SAndroid Build Coastguard WorkerCFLAGS ?= -O -Wall -W -Wundef -Wformat-y2k -Wformat-security -Winit-self -Wmissing-include-dirs \
76*2d543d20SAndroid Build Coastguard Worker          -Wunused -Wunknown-pragmas -Wstrict-aliasing -Wshadow -Wpointer-arith \
77*2d543d20SAndroid Build Coastguard Worker          -Wbad-function-cast -Wcast-align -Wwrite-strings -Waggregate-return \
78*2d543d20SAndroid Build Coastguard Worker          -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes \
79*2d543d20SAndroid Build Coastguard Worker          -Wmissing-declarations -Wmissing-noreturn -Wmissing-format-attribute \
80*2d543d20SAndroid Build Coastguard Worker          -Wredundant-decls -Wnested-externs -Winline -Winvalid-pch -Wvolatile-register-var \
81*2d543d20SAndroid Build Coastguard Worker          -Wdisabled-optimization -Wbuiltin-macro-redefined \
82*2d543d20SAndroid Build Coastguard Worker          -Wattributes -Wmultichar \
83*2d543d20SAndroid Build Coastguard Worker          -Wdeprecated-declarations -Wdiv-by-zero -Wdouble-promotion -Wendif-labels -Wextra \
84*2d543d20SAndroid Build Coastguard Worker          -Wformat-extra-args -Wformat-zero-length -Wformat=2 -Wmultichar \
85*2d543d20SAndroid Build Coastguard Worker          -Woverflow -Wpointer-to-int-cast -Wpragmas \
86*2d543d20SAndroid Build Coastguard Worker          -Wframe-larger-than=$(MAX_STACK_SIZE) \
87*2d543d20SAndroid Build Coastguard Worker          -fstack-protector-all --param=ssp-buffer-size=4 -fexceptions \
88*2d543d20SAndroid Build Coastguard Worker          -fasynchronous-unwind-tables -fdiagnostics-show-option \
89*2d543d20SAndroid Build Coastguard Worker          -Werror -Wno-aggregate-return \
90*2d543d20SAndroid Build Coastguard Worker          $(EXTRA_CFLAGS)
91*2d543d20SAndroid Build Coastguard Worker
92*2d543d20SAndroid Build Coastguard WorkerLD_SONAME_FLAGS=-soname,$(LIBSO),--version-script=libselinux.map,-z,defs,-z,relro
93*2d543d20SAndroid Build Coastguard Worker
94*2d543d20SAndroid Build Coastguard Workerifeq ($(OS), Darwin)
95*2d543d20SAndroid Build Coastguard Workeroverride CFLAGS += -I/opt/local/include
96*2d543d20SAndroid Build Coastguard Workeroverride LDFLAGS += -L/opt/local/lib -undefined dynamic_lookup
97*2d543d20SAndroid Build Coastguard WorkerLD_SONAME_FLAGS=-install_name,$(LIBSO)
98*2d543d20SAndroid Build Coastguard Workerendif
99*2d543d20SAndroid Build Coastguard Worker
100*2d543d20SAndroid Build Coastguard Worker# override with -lfts when building on Musl libc to use fts-standalone
101*2d543d20SAndroid Build Coastguard WorkerFTS_LDLIBS ?=
102*2d543d20SAndroid Build Coastguard Worker
103*2d543d20SAndroid Build Coastguard Workeroverride CFLAGS += -I../include -D_GNU_SOURCE $(DISABLE_FLAGS) $(PCRE_CFLAGS)
104*2d543d20SAndroid Build Coastguard Worker
105*2d543d20SAndroid Build Coastguard Worker# check for strlcpy(3) availability
106*2d543d20SAndroid Build Coastguard WorkerH := \#
107*2d543d20SAndroid Build Coastguard Workerifeq (yes,$(shell printf '${H}include <string.h>\nint main(void){char d[2];const char *s="a";return (size_t)strlcpy(d,s,sizeof(d))>=sizeof(d);}' | $(CC) $(CFLAGS) $(LDFLAGS) -x c -o /dev/null - >/dev/null 2>&1 && echo yes))
108*2d543d20SAndroid Build Coastguard Workeroverride CFLAGS += -DHAVE_STRLCPY
109*2d543d20SAndroid Build Coastguard Workerendif
110*2d543d20SAndroid Build Coastguard Worker
111*2d543d20SAndroid Build Coastguard Worker# check for reallocarray(3) availability
112*2d543d20SAndroid Build Coastguard WorkerH := \#
113*2d543d20SAndroid Build Coastguard Workerifeq (yes,$(shell printf '${H}include <stdlib.h>\nint main(void){return reallocarray(NULL,0,0)==NULL;}' | $(CC) $(CFLAGS) $(LDFLAGS) -x c -o /dev/null - >/dev/null 2>&1 && echo yes))
114*2d543d20SAndroid Build Coastguard Workeroverride CFLAGS += -DHAVE_REALLOCARRAY
115*2d543d20SAndroid Build Coastguard Workerendif
116*2d543d20SAndroid Build Coastguard Worker
117*2d543d20SAndroid Build Coastguard WorkerSWIG_CFLAGS += -Wno-error -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-parameter \
118*2d543d20SAndroid Build Coastguard Worker		-Wno-shadow -Wno-uninitialized -Wno-missing-prototypes -Wno-missing-declarations \
119*2d543d20SAndroid Build Coastguard Worker		-Wno-deprecated-declarations
120*2d543d20SAndroid Build Coastguard Worker
121*2d543d20SAndroid Build Coastguard WorkerRANLIB ?= ranlib
122*2d543d20SAndroid Build Coastguard Worker
123*2d543d20SAndroid Build Coastguard WorkerARCH := $(patsubst i%86,i386,$(shell uname -m))
124*2d543d20SAndroid Build Coastguard Workerifneq (,$(filter i386,$(ARCH)))
125*2d543d20SAndroid Build Coastguard WorkerTLSFLAGS += -mno-tls-direct-seg-refs
126*2d543d20SAndroid Build Coastguard Workerendif
127*2d543d20SAndroid Build Coastguard Worker
128*2d543d20SAndroid Build Coastguard Workerifeq ($(ANDROID_HOST),y)
129*2d543d20SAndroid Build Coastguard WorkerDISABLE_FLAGS+= -DNO_MEDIA_BACKEND -DNO_DB_BACKEND -DNO_X_BACKEND \
130*2d543d20SAndroid Build Coastguard Worker	-DBUILD_HOST
131*2d543d20SAndroid Build Coastguard WorkerSRCS= callbacks.c freecon.c label.c label_file.c \
132*2d543d20SAndroid Build Coastguard Worker	label_backends_android.c regex.c label_support.c \
133*2d543d20SAndroid Build Coastguard Worker	matchpathcon.c setrans_client.c sha1.c booleans.c
134*2d543d20SAndroid Build Coastguard WorkerLABEL_BACKEND_ANDROID=y
135*2d543d20SAndroid Build Coastguard Workerendif
136*2d543d20SAndroid Build Coastguard Worker
137*2d543d20SAndroid Build Coastguard Workerifneq ($(LABEL_BACKEND_ANDROID),y)
138*2d543d20SAndroid Build Coastguard WorkerSRCS:= $(filter-out label_backends_android.c, $(SRCS))
139*2d543d20SAndroid Build Coastguard WorkerDISABLE_FLAGS+= -DNO_ANDROID_BACKEND
140*2d543d20SAndroid Build Coastguard Workerendif
141*2d543d20SAndroid Build Coastguard Worker
142*2d543d20SAndroid Build Coastguard Workerifeq ($(DISABLE_X11),y)
143*2d543d20SAndroid Build Coastguard WorkerSRCS:= $(filter-out label_x.c, $(SRCS))
144*2d543d20SAndroid Build Coastguard Workerendif
145*2d543d20SAndroid Build Coastguard Worker
146*2d543d20SAndroid Build Coastguard WorkerSWIGRUBY = swig -Wall -ruby -o $(SWIGRUBYCOUT) -outdir ./ $(DISABLE_FLAGS)
147*2d543d20SAndroid Build Coastguard Worker
148*2d543d20SAndroid Build Coastguard Workerall: $(LIBA) $(LIBSO) $(LIBPC)
149*2d543d20SAndroid Build Coastguard Worker
150*2d543d20SAndroid Build Coastguard Workerpywrap: all selinuxswig_python_exception.i
151*2d543d20SAndroid Build Coastguard Worker	CFLAGS="$(CPPFLAGS) $(CFLAGS) $(SWIG_CFLAGS)" $(PYTHON) setup.py build_ext
152*2d543d20SAndroid Build Coastguard Worker
153*2d543d20SAndroid Build Coastguard Workerrubywrap: all $(SWIGRUBYSO)
154*2d543d20SAndroid Build Coastguard Worker
155*2d543d20SAndroid Build Coastguard Worker$(SWIGRUBYLOBJ): $(SWIGRUBYCOUT)
156*2d543d20SAndroid Build Coastguard Worker	$(CC) $(CPPFLAGS) $(CFLAGS) $(SWIG_CFLAGS) $(RUBYINC) -fPIC -DSHARED -c -o $@ $<
157*2d543d20SAndroid Build Coastguard Worker
158*2d543d20SAndroid Build Coastguard Worker$(SWIGRUBYSO): $(SWIGRUBYLOBJ)
159*2d543d20SAndroid Build Coastguard Worker	$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -L. -shared -o $@ $^ -lselinux $(RUBYLIBS)
160*2d543d20SAndroid Build Coastguard Worker
161*2d543d20SAndroid Build Coastguard Worker$(LIBA): $(OBJS)
162*2d543d20SAndroid Build Coastguard Worker	$(AR) rcs $@ $^
163*2d543d20SAndroid Build Coastguard Worker	$(RANLIB) $@
164*2d543d20SAndroid Build Coastguard Worker
165*2d543d20SAndroid Build Coastguard Worker$(LIBSO): $(LOBJS)
166*2d543d20SAndroid Build Coastguard Worker	$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ $(PCRE_LDLIBS) $(FTS_LDLIBS) -ldl -Wl,$(LD_SONAME_FLAGS)
167*2d543d20SAndroid Build Coastguard Worker	ln -sf $@ $(TARGET)
168*2d543d20SAndroid Build Coastguard Worker
169*2d543d20SAndroid Build Coastguard Worker$(LIBPC): $(LIBPC).in ../VERSION
170*2d543d20SAndroid Build Coastguard Worker	sed -e 's/@VERSION@/$(VERSION)/; s:@prefix@:$(PREFIX):; s:@libdir@:$(LIBDIR):; s:@includedir@:$(INCLUDEDIR):; s:@PCRE_MODULE@:$(PCRE_MODULE):' < $< > $@
171*2d543d20SAndroid Build Coastguard Worker
172*2d543d20SAndroid Build Coastguard Workerselinuxswig_python_exception.i: exception.sh ../include/selinux/selinux.h
173*2d543d20SAndroid Build Coastguard Worker	bash -e exception.sh > $@ || (rm -f $@ ; false)
174*2d543d20SAndroid Build Coastguard Worker
175*2d543d20SAndroid Build Coastguard Worker%.o:  %.c policy.h
176*2d543d20SAndroid Build Coastguard Worker	$(CC) $(CPPFLAGS) $(CFLAGS) $(TLSFLAGS) -c -o $@ $<
177*2d543d20SAndroid Build Coastguard Worker
178*2d543d20SAndroid Build Coastguard Worker%.lo:  %.c policy.h
179*2d543d20SAndroid Build Coastguard Worker	$(CC) $(CPPFLAGS) $(CFLAGS) -fPIC -DSHARED -c -o $@ $<
180*2d543d20SAndroid Build Coastguard Worker
181*2d543d20SAndroid Build Coastguard Worker$(SWIGRUBYCOUT): $(SWIGRUBYIF)
182*2d543d20SAndroid Build Coastguard Worker	$(SWIGRUBY) $<
183*2d543d20SAndroid Build Coastguard Worker
184*2d543d20SAndroid Build Coastguard Workerinstall: all
185*2d543d20SAndroid Build Coastguard Worker	test -d $(DESTDIR)$(LIBDIR) || install -m 755 -d $(DESTDIR)$(LIBDIR)
186*2d543d20SAndroid Build Coastguard Worker	install -m 644 $(LIBA) $(DESTDIR)$(LIBDIR)
187*2d543d20SAndroid Build Coastguard Worker	test -d $(DESTDIR)$(SHLIBDIR) || install -m 755 -d $(DESTDIR)$(SHLIBDIR)
188*2d543d20SAndroid Build Coastguard Worker	install -m 755 $(LIBSO) $(DESTDIR)$(SHLIBDIR)
189*2d543d20SAndroid Build Coastguard Worker	test -d $(DESTDIR)$(LIBDIR)/pkgconfig || install -m 755 -d $(DESTDIR)$(LIBDIR)/pkgconfig
190*2d543d20SAndroid Build Coastguard Worker	install -m 644 $(LIBPC) $(DESTDIR)$(LIBDIR)/pkgconfig
191*2d543d20SAndroid Build Coastguard Worker	ln -sf --relative $(DESTDIR)$(SHLIBDIR)/$(LIBSO) $(DESTDIR)$(LIBDIR)/$(TARGET)
192*2d543d20SAndroid Build Coastguard Worker
193*2d543d20SAndroid Build Coastguard Workerinstall-pywrap: pywrap
194*2d543d20SAndroid Build Coastguard Worker	CFLAGS="$(CPPFLAGS) $(CFLAGS) $(SWIG_CFLAGS)" $(PYTHON) -m pip install --prefix=$(PREFIX) `test -n "$(DESTDIR)" && echo --root $(DESTDIR) --ignore-installed --no-deps` $(PYTHON_SETUP_ARGS) .
195*2d543d20SAndroid Build Coastguard Worker	install -m 644 $(SWIGPYOUT) $(DESTDIR)$(PYTHONLIBDIR)/selinux/__init__.py
196*2d543d20SAndroid Build Coastguard Worker	ln -sf --relative $(DESTDIR)$(PYTHONLIBDIR)/selinux/_selinux$(PYCEXT) $(DESTDIR)$(PYTHONLIBDIR)/_selinux$(PYCEXT)
197*2d543d20SAndroid Build Coastguard Worker
198*2d543d20SAndroid Build Coastguard Workerinstall-rubywrap: rubywrap
199*2d543d20SAndroid Build Coastguard Worker	test -d $(DESTDIR)$(RUBYINSTALL) || install -m 755 -d $(DESTDIR)$(RUBYINSTALL)
200*2d543d20SAndroid Build Coastguard Worker	install -m 755 $(SWIGRUBYSO) $(DESTDIR)$(RUBYINSTALL)/selinux.so
201*2d543d20SAndroid Build Coastguard Worker
202*2d543d20SAndroid Build Coastguard Workerrelabel:
203*2d543d20SAndroid Build Coastguard Worker	/sbin/restorecon $(DESTDIR)$(SHLIBDIR)/$(LIBSO)
204*2d543d20SAndroid Build Coastguard Worker
205*2d543d20SAndroid Build Coastguard Workerclean-pywrap:
206*2d543d20SAndroid Build Coastguard Worker	-rm -f $(SWIGLOBJ) $(SWIGSO) $(AUDIT2WHYLOBJ) $(AUDIT2WHYSO)
207*2d543d20SAndroid Build Coastguard Worker	$(PYTHON) setup.py clean
208*2d543d20SAndroid Build Coastguard Worker	-rm -rf build *~ \#* *pyc .#* selinux.egg-info/
209*2d543d20SAndroid Build Coastguard Worker
210*2d543d20SAndroid Build Coastguard Workerclean-rubywrap:
211*2d543d20SAndroid Build Coastguard Worker	-rm -f $(SWIGRUBYLOBJ) $(SWIGRUBYSO)
212*2d543d20SAndroid Build Coastguard Worker
213*2d543d20SAndroid Build Coastguard Workerclean: clean-pywrap clean-rubywrap
214*2d543d20SAndroid Build Coastguard Worker	-rm -f $(LIBPC) $(OBJS) $(LOBJS) $(LIBA) $(LIBSO) $(TARGET) *.o *.lo *~
215*2d543d20SAndroid Build Coastguard Worker
216*2d543d20SAndroid Build Coastguard Workerdistclean: clean
217*2d543d20SAndroid Build Coastguard Worker	rm -f $(GENERATED) $(SWIGFILES)
218*2d543d20SAndroid Build Coastguard Worker
219*2d543d20SAndroid Build Coastguard Workerindent:
220*2d543d20SAndroid Build Coastguard Worker	../../scripts/Lindent $(filter-out $(GENERATED),$(wildcard *.[ch]))
221*2d543d20SAndroid Build Coastguard Worker
222*2d543d20SAndroid Build Coastguard Worker.PHONY: all clean clean-pywrap clean-rubywrap pywrap rubywrap swigify install install-pywrap install-rubywrap distclean
223