forked from pflanze/privbind
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.am
32 lines (24 loc) · 1.01 KB
/
Makefile.am
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
sbin_PROGRAMS = privbind
pkglib_LTLIBRARIES = privbind.la
noinst_PROGRAMS = testbind
doc_DATA = README
man_MANS = privbind.1
EXTRA_DIST = $(man_MANS)
privbind_SOURCES = main.c
noinst_HEADERS = ipc.h stub.h
privbind_la_SOURCES = libprivbind.c
privbind_la_LDFLAGS=-ldl -module -avoid-version
testbind_SOURCES = test.c
testbind_LDADD = -lpthread
# Define the various "make test" targets
.PHONY: test test-su test-sudo
test: privbind$(EXEEXT) testbind$(EXEEXT) privbind.la
if [ -z "$(TESTUSER)" ] ; then echo "Must specify TESTUSER to use in test" ; exit 1 ; fi
./privbind -u$(TESTUSER) -l`pwd`/.libs/@PRELOADLIBNAME@ $(PRIVBIND_PARAMS) \
./testbind $(TESTBIND_PARAMS)
test-su: privbind$(EXEEXT) testbind$(EXEEXT) privbind.la
su -c "$(MAKE) test TESTUSER=$(USER) PRIVBIND_PARAMS='$(PRIVBIND_PARAMS)' \
TESTBIND_PARAMS='$(TESTBIND_PARAMS)'"
test-sudo: privbind$(EXEEXT) testbind$(EXEEXT) privbind.la
sudo $(MAKE) test TESTUSER=$(USER) PRIVBIND_PARAMS='$(PRIVBIND_PARAMS)' \
TESTBIND_PARAMS='$(TESTBIND_PARAMS)'