Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 72 lines (59 sloc) 2.441 kb
441fde8 @msantos Interface for requesting privileged sockets in Erlang.
authored
1 ###########################################################################
2 # libancillary - black magic on Unix domain sockets
3 # (C) Nicolas George
4 # Makefile - guess what
5 ###########################################################################
6
7 # Redistribution and use in source and binary forms, with or without
8 # modification, are permitted provided that the following conditions are met:
9 #
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.
17 #
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.
28
29 CC=gcc
4e410d2 @msantos Use a private CFLAGS var
authored
30 CFLAGS=-Wall -fPIC -g -O2 $(PROCKET_CFLAGS)
441fde8 @msantos Interface for requesting privileged sockets in Erlang.
authored
31 LDFLAGS=
32 LIBS=
33 AR=ar
34 RANLIB=ranlib
35 RM=rm
36 CP=cp
37 MKDIR=mkdir
38 TAR=tar
39 GZIP=gzip -9
40
41 NAME=libancillary
42 DISTRIBUTION=API COPYING Makefile ancillary.h fd_send.c fd_recv.c test.c
43 VERSION=0.9.1
44
45 OBJECTS=fd_send.o fd_recv.o
46
47 TUNE_OPTS=-DNDEBUG -DSPARE_SEND_FDS -DSPARE_RECV_FDS
48
49 .c.o:
50 $(CC) -c $(CFLAGS) $(TUNE_OPTS) $<
51
52 all: libancillary.a
53
54 libancillary.a: $(OBJECTS)
55 $(AR) cr $@ $(OBJECTS)
56 $(RANLIB) $@
57
58 fd_send.o: ancillary.h
59 fd_recv.o: ancillary.h
60
61 test: test.c libancillary.a
62 $(CC) -o $@ $(CFLAGS) $(LDFLAGS) -L. test.c -lancillary $(LIBS)
63
64 clean:
65 -$(RM) -f *.o *.a test
66
67 dist:
68 $(MKDIR) $(NAME)-$(VERSION)
69 $(CP) $(DISTRIBUTION) $(NAME)-$(VERSION)
70 $(TAR) -cf - $(NAME)-$(VERSION) | $(GZIP) > $(NAME)-$(VERSION).tar.gz
71 $(RM) -rf $(NAME)-$(VERSION)
Something went wrong with that request. Please try again.