aboutsummaryrefslogtreecommitdiff
path: root/libsemanage/tests
diff options
context:
space:
mode:
authorJason Zaman <jason@perfinion.com>2017-04-25 01:59:56 +0800
committerStephen Smalley <sds@tycho.nsa.gov>2017-04-25 08:27:05 -0400
commitfcb5d5cc721187b3e3a19b44155d5b824d7be7e6 (patch)
treeb697a4837c41064c034cf5c330de7bdec17f2161 /libsemanage/tests
parentb5fe48da2090ceb9f427822fce6ee3da165b77f2 (diff)
downloadselinux-fcb5d5cc721187b3e3a19b44155d5b824d7be7e6.tar.gz
Makefiles: drop -L/-I to system paths
The toolchain automatically handles them and they break cross compiling. LDFLAGS should also come before object files, some flags (eg, -Wl,as-needed) can break things if they are in the wrong place) Gentoo-Bug: https://bugs.gentoo.org/500674 Signed-off-by: Jason Zaman <jason@perfinion.com>
Diffstat (limited to 'libsemanage/tests')
-rw-r--r--libsemanage/tests/Makefile8
1 files changed, 4 insertions, 4 deletions
diff --git a/libsemanage/tests/Makefile b/libsemanage/tests/Makefile
index 885b5443..9b272247 100644
--- a/libsemanage/tests/Makefile
+++ b/libsemanage/tests/Makefile
@@ -5,20 +5,20 @@ LIBDIR ?= $(PREFIX)/lib
SOURCES = $(wildcard *.c)
# Add the required external object files here:
-LIBS = ../src/libsemanage.a -L$(LIBDIR) -lselinux -lsepol
+LIBS = ../src/libsemanage.a -lselinux -lsepol
###########################################################################
EXECUTABLE = libsemanage-tests
CFLAGS += -g -O0 -Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute -Wno-unused-parameter
-INCLUDE = -I../src -I../include -I$(PREFIX)/include
-LDFLAGS += -lcunit -lbz2 -laudit
+INCLUDE = -I../src -I../include
+LDLIBS += -lcunit -lbz2 -laudit
OBJECTS = $(SOURCES:.c=.o)
all: $(EXECUTABLE)
$(EXECUTABLE): $(OBJECTS) ../src/libsemanage.a
- $(CC) $(OBJECTS) $(LIBS) $(LDFLAGS) -o $@
+ $(CC) $(OBJECTS) $(LIBS) $(LDFLAGS) -o $@ $(LDLIBS)
%.o: %.c
$(CC) $(CFLAGS) $(INCLUDE) -c $*.c -o $*.o