File: Makefile.am

package info (click to toggle)
privbind 1.2-1.1
  • links: PTS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, sid, stretch, wheezy
  • size: 1,584 kB
  • ctags: 89
  • sloc: sh: 11,681; ansic: 629; makefile: 75
file content (32 lines) | stat: -rw-r--r-- 1,033 bytes parent folder | download | duplicates (2)
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)'