1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
# Makefile for compartment
OPTS=$(RPM_OPT_FLAGS)
ROOT=$(RPM_BUILD_ROOT)
ifeq ($(CC),)
CC=gcc
endif
ifeq ($(RPM_OPT_FLAGS),)
OPTS=-Wall -O2
endif
ifeq ($(RPM_BUILD_ROOT),)
ROOT=/
endif
INSTALL=install
PREFIX=/usr
BIN_DIR=${PREFIX}/sbin
BIN_LIST=compartment
DOC_DIR=${PREFIX}/share/doc/packages/compartment
DOC_LIST=README CHANGES TODO
MAN_DIR=${PREFIX}/share/man/man1
MAN_LIST=compartment.1
all: compartment
compartment: compartment.c
${CC} -c ${CFLAGS} ${CPPFLAGS} -o ${BIN_LIST} compartment.c ${LDFLAGS}
# strip ${BIN_LIST}
clean:
rm -f ${BIN_LIST} core *~
install: ${BIN_LIST}
install -o root -g root -m 751 ${BIN_LIST} ${BIN_DIR}
install -d -o root -g root -m 755 ${DOC_DIR}
install -o root -g root -m 644 ${DOC_LIST} ${DOC_DIR}
install -d -o root -g root -m 755 ${MAN_DIR}
install -o root -g root -m 644 ${MAN_LIST} ${MAN_DIR}
|