Skip to content

Commit 1bb6938

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 1bb6938

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

libselinux/src/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,10 @@ 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 $@ $^
@@ -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)