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:
Nicolas Iooss 2016-02-05 21:55:51 +01:00 committed by Steve Lawrence
parent 061c4fcbd4
commit 1e979a7a36
1 changed files with 3 additions and 3 deletions

View File

@ -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)