/[libspopc]/Makefile
ViewVC logotype

Annotation of /Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 14 - (hide annotations)
Tue Sep 7 17:31:05 2010 UTC (10 years, 2 months ago) by ben
File size: 2247 byte(s)
version 0.13
1 ben 1 DIET=
2 ben 4 OBJECTS=session.o queries.o parsing.o format.o objects.o libspopc.o mutex.o
3 ben 1 #
4     # libspoopc can be built with/without some features:
5     #
6 ben 4 # the full libspopc: with semaphres and SSL (openssl)
7 ben 14 VERSION=0.13rs
8 ben 10 CFLAGS= -Wall -Wextra -pedantic -pipe -fPIC -Os -DUSE_SSL -D_REENTRANT -DUSE_SEM
9     LDFLAGS=-lssl -lcrypto -lrt
10 ben 1 #
11 ben 4 # the full libspopc: with mutexes and SSL (openssl)
12 ben 14 #VERSION=0.13ps
13 ben 4 #CFLAGS= -Wall -Wextra -pedantic -pipe -fPIC -Os -DUSE_SSL -D_REENTRANT -DUSE_PMUTEX
14     #LDFLAGS=-lssl -lcrypto -lpthread
15     #
16 ben 1 # the backward-compat non-reentrant libspopc with SSL (openssl)
17 ben 14 #VERSION=0.13s
18 ben 4 #CFLAGS= -Wall -Wextra -pedantic -pipe -fPIC -g -DUSE_SSL
19     #LDFLAGS=-lssl -lcrypto
20 ben 1 #
21     # the backward-compat non-reentrant non-SSL libspopc
22 ben 14 #VERSION=0.13n
23 ben 10 #CFLAGS= -Wall -Wextra -pedantic -pipe -fPIC -Os
24     #LDFLAGS=
25 ben 1 #
26     # info: strdup, snprintf.. are not in ANSI versions of stdio.h/string.h
27     # this could be nice to conform to -ansi or to -std=iso9899:199409
28     #
29     all : libspopc.a libspopc.so examples
30     @echo ""
31     @echo "read Makefile comments to build different flavours of libspopc"
32     @echo "please also read the README file"
33     #
34     %.o : %.c libspopc.h
35     $(DIET) $(CC) $(CFLAGS) -c $<
36     #
37     libspopc.a : $(OBJECTS)
38     $(RM) libspopc*.a
39     ar r libspopc-$(VERSION).a $(OBJECTS)
40     ranlib libspopc-$(VERSION).a
41     ln -s libspopc-$(VERSION).a libspopc.a
42     #
43     libspopc.so : $(OBJECTS)
44     $(RM) libspopc*.so
45     $(DIET) $(CC) -o libspopc-$(VERSION).so -shared $(OBJECTS)
46     ln -s libspopc-$(VERSION).so libspopc.so
47     #
48     %: examples/%.c
49     $(DIET) $(CC) -o $@ $(CFLAGS) $< -L. -lspopc $(LDFLAGS)
50     #
51     examples: libspopc.a poptest1 poptest2 butcher poptest3
52     @echo ""
53     @echo "to use examples, export LD_LIBRARY_PATH=.:"'$$LD_LIBRARY_PATH'
54     #
55     uninstall :
56     $(RM) $(DESTDIR)/usr/lib/libspopc*.a
57     $(RM) $(DESTDIR)/usr/lib/libspopc*.so
58     $(RM) $(DESTDIR)/usr/include/libspopc*.h
59     #
60     install :
61     #strip libspopc.so
62     install libspopc-$(VERSION).a $(DESTDIR)/usr/lib/
63     cd $(DESTDIR)/usr/lib/ && ln -f -s libspopc-$(VERSION).a libspopc.a
64     install libspopc-$(VERSION).so $(DESTDIR)/usr/lib/
65     cd $(DESTDIR)/usr/lib/ && ln -f -s libspopc-$(VERSION).so libspopc.so
66     install libspopc.h $(DESTDIR)/usr/include/
67     #
68     clean :
69     $(RM) *.o poptest* butcher*
70     #
71     distclean : clean
72     $(RM) libspopc*.a libspopc*.so
73     $(RM) *~ examples/*~ doc/*~
74    

  ViewVC Help
Powered by ViewVC 1.1.26