Added pndnotifyd to monitor the dirs in the search-path; will be adding to it to...
[pandora-libraries.git] / Makefile
1
2 #
3 # libpnd Makefile
4 #
5
6 # tools
7 CC = gcc
8 AR = ar
9 RANLIB = ranlib
10 RM = rm
11
12 # environment
13 VPATH = lib test apps
14 CFLAG_SO = -fPIC #-fPIC not always needed, but good to have
15 CFLAGS = -Wall -I./include -g ${CFLAG_SO}
16
17 # code
18 LIB = libpnd.a 
19 SOLIB = libpnd.so.1         # canonicle name
20 SOLIB1 = libpnd.so.1.0.1    # versioned name
21 XMLOBJ = lib/tinyxml/tinystr.o lib/tinyxml/tinyxml.o lib/tinyxml/tinyxmlerror.o lib/tinyxml/tinyxmlparser.o
22 ALLOBJ = pnd_conf.o pnd_container.o pnd_discovery.o pnd_pxml.o pnd_notify.o pnd_locate.o pnd_tinyxml.o
23
24 all: ${SOLIB} ${LIB} conftest discotest notifytest locatetest pndnotifyd
25
26 clean:
27         ${RM} -f ${ALLOBJ} ${XMLOBJ} ${LIB} ${SOLIB1} locatetest.o bin/locatetest conftest.o bin/conftest discotest.o bin/discotest bin/notifytest notifytest.o bin/pndnotifyd pndnotifyd.o ${SOLIB}
28
29 libpnd.a:       ${ALLOBJ} ${XMLOBJ}
30         ${AR} r ${LIB} ${ALLOBJ} ${XMLOBJ}
31         ${RANLIB} ${LIB}
32
33 libpnd.so.1:    ${ALLOBJ} ${XMLOBJ}
34         ${CC} -shared -Wl,-soname,${SOLIB} -o ${SOLIB1} ${ALLOBJ} ${XMLOBJ}
35         ln -f -s ${SOLIB1} ${SOLIB}
36
37 conftest:       conftest.o ${LIB}
38         ${CC} -lstdc++ -o bin/conftest conftest.o libpnd.a
39
40 discotest:      discotest.o ${LIB}
41         ${CC} -lstdc++ -o bin/discotest discotest.o libpnd.a
42
43 notifytest:     notifytest.o ${LIB}
44         ${CC} -lstdc++ -o bin/notifytest notifytest.o libpnd.a
45
46 locatetest:     locatetest.o ${SOLIB1}
47         ${CC} -lstdc++ -o bin/locatetest locatetest.o ${SOLIB1}
48
49 pndnotifyd:     pndnotifyd.o ${SOLIB1}
50         ${CC} -lstdc++ -o bin/pndnotifyd pndnotifyd.o ${SOLIB1}