Skip to contentSkip to conversation

secon makefile

PATCH In review Joshua Brindle 2 participants 2 messages Aug 2, 2006 – Aug 3, 2006 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 secon makefile

The secon makefile did not correctly respect DESTDIR so building the repo in a sandbox was not possible.

secon/Makefile +8 -10
Index: policycoreutils/secon/Makefile
===================================================================
@@ -1,18 +1,19 @@
 # secon tool - command-line context
 PREFIX ?= ${DESTDIR}/usr
+INCLUDEDIR ?= $(PREFIX)/include
 BINDIR ?= $(PREFIX)/bin
+MANDIR ?= $(PREFIX)/share/man
+LIBDIR ?= ${PREFIX}/lib
 
-LIBSELINUX      = -lselinux
-
-WARNS=-W -Wall -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wno-format-zero-length -Wformat-nonliteral -Wformat-security -Wfloat-equal -O1
+WARNS=-W -Wall -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wno-format-zero-length -Wformat-nonliteral -Wformat-security -Wfloat-equal
 VERSION = $(shell cat ../VERSION)
-CFLAGS ?= -Werror -Wall -W
-override CFLAGS += -DVERSION=\"$(VERSION)\" 
+CFLAGS ?= $(WARNS) -O1
+override CFLAGS += -DVERSION=\"$(VERSION)\" -I$(INCLUDEDIR) 
+LDLIBS = -lselinux -L$(LIBDIR)
 
 all: secon
 
-secon: secon.o
-	$(CC) -o $@ $< $(LIBS) $(LINKFLAGS) $(LIBSELINUX) 
+secon: secon.o 
 
 install-nogui: install
 
@@ -25,9 +26,6 @@
 relabel:
 	/sbin/restorecon $(BINDIR)/secon
 
-%.o:  %.c
-	$(CC) $(WARNS) $(CFLAGS) -c $<
-
 clean:
 	rm -f *.o core* secon *~ *.bak
 

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#1 lore raw
Quoted 2 lines · Joshua Brindle

The secon makefile did not correctly respect DESTDIR so building the repo in a sandbox was not possible.

Thanks, merged.

Signature · 8 lines
Stephen Smalley
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.