mirror of
https://github.com/topjohnwu/selinux.git
synced 2024-12-13 06:17:17 +00:00
libsemanage: tests: do not overwrite CFLAGS and LDFLAGS
libsemanage/tests/Makefile currently overwrites CFLAGS and LDFLAGS contents. This makes building with custom flags (e.g. with address sanitizer) harder. Append flags to these variables instead. Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
This commit is contained in:
parent
061c4fcbd4
commit
1e979a7a36
@ -11,9 +11,9 @@ LIBS = ../src/libsemanage.a ../../libselinux/src/libselinux.a ../../libsepol/src
|
||||
|
||||
EXECUTABLE = libsemanage-tests
|
||||
CC = gcc
|
||||
CFLAGS = -c -g -O0 -Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute -Wno-unused-parameter
|
||||
CFLAGS += -g -O0 -Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute -Wno-unused-parameter
|
||||
INCLUDE = -I$(TESTSRC) -I$(TESTSRC)/../include
|
||||
LDFLAGS = -lcunit -lustr -lbz2 -laudit
|
||||
LDFLAGS += -lcunit -lustr -lbz2 -laudit
|
||||
OBJECTS = $(SOURCES:.c=.o)
|
||||
|
||||
all: $(EXECUTABLE)
|
||||
@ -22,7 +22,7 @@ $(EXECUTABLE): $(OBJECTS)
|
||||
$(CC) $(OBJECTS) $(LIBS) $(LDFLAGS) -o $@
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) $(INCLUDE) $*.c -o $*.o
|
||||
$(CC) $(CFLAGS) $(INCLUDE) -c $*.c -o $*.o
|
||||
|
||||
clean distclean:
|
||||
rm -rf $(OBJECTS) $(EXECUTABLE)
|
||||
|
Loading…
Reference in New Issue
Block a user