Skip to content

Commit 7dad7ca

Browse files
committed
libselinux: Add CPPFLAGS to Makefile
Add CPPFLAGS to Makefile to allow users change the flags of preprocessor. We offen use CFLAGS for compiler flags and use CPPFLAGS for preprocessor. Signed-off-by: Chung-Sheng Wu <[email protected]>
1 parent c2d58b3 commit 7dad7ca

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

libselinux/src/Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,17 +149,17 @@ pywrap: all selinuxswig_python_exception.i
149149
rubywrap: all $(SWIGRUBYSO)
150150

151151
$(SWIGRUBYLOBJ): $(SWIGRUBYCOUT)
152-
$(CC) $(CFLAGS) $(SWIG_CFLAGS) $(RUBYINC) -fPIC -DSHARED -c -o $@ $<
152+
$(CC) $(CPPFLAGS) $(CFLAGS) $(SWIG_CFLAGS) $(RUBYINC) -fPIC -DSHARED -c -o $@ $<
153153

154154
$(SWIGRUBYSO): $(SWIGRUBYLOBJ)
155-
$(CC) $(CFLAGS) $(LDFLAGS) -L. -shared -o $@ $^ -lselinux $(RUBYLIBS)
155+
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -L. -shared -o $@ $^ -lselinux $(RUBYLIBS)
156156

157157
$(LIBA): $(OBJS)
158158
$(AR) rcs $@ $^
159159
$(RANLIB) $@
160160

161161
$(LIBSO): $(LOBJS)
162-
$(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ $(PCRE_LDLIBS) $(FTS_LDLIBS) -ldl -Wl,$(LD_SONAME_FLAGS)
162+
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ $(PCRE_LDLIBS) $(FTS_LDLIBS) -ldl -Wl,$(LD_SONAME_FLAGS)
163163
ln -sf $@ $(TARGET)
164164

165165
$(LIBPC): $(LIBPC).in ../VERSION
@@ -169,10 +169,10 @@ selinuxswig_python_exception.i: exception.sh ../include/selinux/selinux.h
169169
bash -e exception.sh > $@ || (rm -f $@ ; false)
170170

171171
%.o: %.c policy.h
172-
$(CC) $(CFLAGS) $(TLSFLAGS) -c -o $@ $<
172+
$(CC) $(CPPFLAGS) $(CFLAGS) $(TLSFLAGS) -c -o $@ $<
173173

174174
%.lo: %.c policy.h
175-
$(CC) $(CFLAGS) -fPIC -DSHARED -c -o $@ $<
175+
$(CC) $(CPPFLAGS) $(CFLAGS) -fPIC -DSHARED -c -o $@ $<
176176

177177
$(SWIGRUBYCOUT): $(SWIGRUBYIF)
178178
$(SWIGRUBY) $<

0 commit comments

Comments
 (0)