1
###########################################################################
2
# libancillary - black magic on Unix domain sockets
4
# Makefile - guess what
5
###########################################################################
7
# Redistribution and use in source and binary forms, with or without
8
# modification, are permitted provided that the following conditions are met:
10
# 1. Redistributions of source code must retain the above copyright notice,
11
# this list of conditions and the following disclaimer.
12
# 2. Redistributions in binary form must reproduce the above copyright
13
# notice, this list of conditions and the following disclaimer in the
14
# documentation and/or other materials provided with the distribution.
15
# 3. The name of the author may not be used to endorse or promote products
16
# derived from this software without specific prior written permission.
18
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
19
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
20
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
21
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
23
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
24
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
26
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
27
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
42
DISTRIBUTION=API COPYING Makefile ancillary.h fd_send.c fd_recv.c test.c
45
OBJECTS=fd_send.o fd_recv.o
49
-DSPARE_SEND_FDS -DSPARE_SEND_FD -DSPARE_RECV_FDS -DSPARE_RECV_FD
52
$(CC) -c $(CFLAGS) $(TUNE_OPTS) $<
56
libancillary.a: $(OBJECTS)
57
$(AR) cr $@ $(OBJECTS)
60
fd_send.o: ancillary.h
61
fd_recv.o: ancillary.h
63
test: test.c libancillary.a
64
$(CC) -o $@ $(CFLAGS) $(LDFLAGS) -L. test.c -lancillary $(LIBS)
67
-$(RM) -f *.o *.a test
70
$(MKDIR) $(NAME)-$(VERSION)
71
$(CP) $(DISTRIBUTION) $(NAME)-$(VERSION)
72
$(TAR) -cf - $(NAME)-$(VERSION) | $(GZIP) > $(NAME)-$(VERSION).tar.gz
73
$(RM) -rf $(NAME)-$(VERSION)