dff20241bb1a04284a9ab8a02b7257d8c4e97352
[OpenSRF.git] / src / libopensrf / Makefile
1 # OSRF_LOG_PARAMS log all incoming method params at OSRF_INFO log level. 
2 # OSRF_STRICT_PARAMS instructs the app handler to return an error if the number of method arguments
3 #       provided to any method is not at least as large as the 'argc' setting for the method
4
5 CFLAGS  +=  -DASSUME_STATELESS  -DOSRF_LOG_PARAMS -DOSRF_STRICT_PARAMS -rdynamic -fno-strict-aliasing
6 LDLIBS  += -lxml2 -lobjson -ldl -lmemcache 
7 OSRF_INC = ../../include/opensrf/
8
9 TARGETS =       osrf_message.o \
10                         osrf_app_session.o \
11                         osrf_stack.o \
12                         osrf_system.o \
13                         osrf_settings.o \
14                         osrf_prefork.o \
15                         osrfConfig.o \
16                         osrf_application.o \
17                         osrf_cache.o \
18                         osrf_transgroup.o \
19                         osrf_list.o \
20                         osrf_hash.o \
21                         xml_utils.o \
22                         transport_message.o\
23                         transport_session.o\
24                         transport_client.o\
25                         md5.o\
26                         log.o\
27                         utils.o\
28                         socket_bundle.o\
29                         sha.o\
30                         string_array.o 
31
32
33 all: opensrf
34
35
36
37 # Build the OpenSRF C binary
38 opensrf:        opensrf.o libopensrf.so
39         @echo $@
40         $(CC) $(CFLAGS) $(LDFLAGS) $(LDLIBS) -lopensrf opensrf.o -o $@
41
42
43 # Build the OpenSRF library
44 libopensrf.so:  $(TARGETS)
45         $(CC) -shared -W1 $(LDFLAGS) $(LDLIBS) $(TARGETS) -o $(TMPDIR)/libopensrf.so
46
47
48 opensrf.o:      opensrf.c
49 transport_message.o:    transport_message.c $(OSRF_INC)/transport_message.h     
50 transport_session.o:    transport_session.c $(OSRF_INC)/transport_session.h     
51 transport_client.o:     transport_client.c $(OSRF_INC)/transport_client.h       
52 osrf_message.o: osrf_message.c $(OSRF_INC)/osrf_message.h
53 osrf_app_session.o:     osrf_app_session.c $(OSRF_INC)/osrf_app_session.h
54 osrf_stack.o:   osrf_stack.c $(OSRF_INC)/osrf_stack.h
55 osrf_system.o:  osrf_system.c $(OSRF_INC)/osrf_system.h
56 osrf_settings.o:        osrf_settings.c $(OSRF_INC)/osrf_settings.h
57 osrf_prefork.o: osrf_prefork.c $(OSRF_INC)/osrf_prefork.h
58 osrfConfig.o:   osrfConfig.c $(OSRF_INC)/osrfConfig.h xml_utils.o
59 osrf_application.o: osrf_application.c $(OSRF_INC)/osrf_application.h
60 osrf_cache.o:   osrf_cache.c $(OSRF_INC)/osrf_cache.h
61 osrf_list.o:    osrf_list.c $(OSRF_INC)/osrf_list.h
62 osrf_hash.o:    osrf_hash.c $(OSRF_INC)/osrf_hash.h
63 md5.o:  md5.c $(OSRF_INC)/md5.h
64 log.o:  log.c $(OSRF_INC)/log.h 
65 utils.o:        utils.c $(OSRF_INC)/utils.h
66 socket_bundle.o:        socket_bundle.c $(OSRF_INC)/socket_bundle.h
67 sha.o:  sha.c $(OSRF_INC)/sha.h
68 string_array.o: string_array.c $(OSRF_INC)/string_array.h
69
70
71 clean:
72         /bin/rm -f *.o libopensrf.so opensrf
73