prepare to upload
[debian/amanda] / common-src / Makefile.am
index d57d351eb20317136cc357b046efdbab0b9c477c..d1686f1f27f9cabf736fb04aad861f8c19d666f4 100644 (file)
@@ -8,10 +8,12 @@ include $(top_srcdir)/config/automake/precompile.am
 INCLUDES =      -I$(top_srcdir)/gnulib   
 
 AM_CFLAGS = $(AMANDA_WARNING_CFLAGS)
-AM_LDFLAGS = $(AMANDA_STATIC_LDFLAGS)
+AM_LDFLAGS = $(AMANDA_STATIC_LDFLAGS) $(AS_NEEDED_FLAGS)
 
 amlib_LTLIBRARIES =    libamanda.la
 
+sbin_PROGRAMS = amservice
+
 LINT=$(AMLINT)
 LINTFLAGS=$(AMLINTFLAGS)
 
@@ -34,7 +36,7 @@ libamanda_la_SOURCES =                \
        packet.c                \
        pipespawn.c             \
        protocol.c              \
-       semaphore.c             \
+       amsemaphore.c           \
        security.c              \
        security-util.c         \
        simpleprng.c            \
@@ -47,6 +49,12 @@ libamanda_la_SOURCES =               \
 # version.c is generated; see below
 nodist_libamanda_la_SOURCES = version.c
 
+INSTALLPERMS_exec = \
+       dest=$(sbindir) chown=root:setuid chmod=04750 \
+               amservice
+
+LDADD = libamanda.la
+
 libamanda_la_LIBADD =          \
        ../gnulib/libgnu.la
 
@@ -88,7 +96,7 @@ endif
 
 libamanda_la_SOURCES += local-security.c
 
-libamanda_la_LDFLAGS =  -release $(VERSION)
+libamanda_la_LDFLAGS =  -release $(VERSION) $(AS_NEEDED_FLAGS)
 
 noinst_HEADERS =               \
        amanda.h                \
@@ -111,7 +119,7 @@ noinst_HEADERS =            \
        packet.h                \
        pipespawn.h             \
        protocol.h              \
-       semaphore.h             \
+       amsemaphore.h           \
        security.h              \
        security-util.h         \
        simpleprng.h            \
@@ -203,7 +211,7 @@ libtestutils_la_SOURCES = \
 
 # automake-style tests
 
-TESTS = amflock-test event-test semaphore-test quoting-test \
+TESTS = amflock-test event-test amsemaphore-test quoting-test \
        ipc-binary-test hexencode-test fileheader-test match-test
 noinst_PROGRAMS = $(TESTS)
 
@@ -213,8 +221,8 @@ amflock_test_LDADD = libamanda.la libtestutils.la
 event_test_SOURCES = event-test.c
 event_test_LDADD = libamanda.la libtestutils.la
 
-semaphore_test_SOURCES = semaphore-test.c
-semaphore_test_LDADD = libamanda.la libtestutils.la
+amsemaphore_test_SOURCES = amsemaphore-test.c
+amsemaphore_test_LDADD = libamanda.la libtestutils.la
 
 quoting_test_SOURCES = quoting-test.c
 quoting_test_LDADD = libamanda.la libtestutils.la