Statistics
| Branch: | Revision:

grapes / src / CloudSupport / Makefile @ 417048c7

History | View | Annotate | Download (1.21 KB)

1
ifndef BASE
2
BASE = ../..
3
else
4
vpath %.c $(BASE)/src/$(notdir $(CURDIR))
5
endif
6
CFGDIR ?= ..
7

    
8
UTILS_DIR = ../Utils
9

    
10
OBJS = cloud_helper.o cloud_helper_utils.o cloud_helper_delegate.o
11
DELEGATE_HELPERS = libs3_delegate_helper.so mysql_delegate_helper.so
12

    
13
CFLAGS += -I$(UTILS_DIR)
14

    
15
all: $(OBJS)
16

    
17
include $(BASE)/src/utils.mak
18

    
19
delegate_helpers: $(DELEGATE_HELPERS)
20

    
21

    
22
libs3_delegate_helper.so: CFLAGS += -fPIC
23
libs3_delegate_helper.so: ../Utils/request_handler.o ../Utils/fifo_queue.o ../config.o ../net_helper$(NH_INCARNATION).o
24
libs3_delegate_helper.so: libs3_delegate_helper.o
25
libs3_delegate_helper.so: CFLAGS += -shared -pthread
26
ifeq (${PLATFORM}, darwin)
27
libs3_delegate_helper.so: CFLAGS += -dynamiclib
28
endif
29
libs3_delegate_helper.so: LDFLAGS += -ls3
30
	$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
31

    
32

    
33
mysql_delegate_helper.so: CFLAGS += -fPIC
34
mysql_delegate_helper.so: ../Utils/request_handler.o ../Utils/fifo_queue.o ../config.o ../net_helper$(NH_INCARNATION).o
35
mysql_delegate_helper.so: mysql_delegate_helper.o
36
mysql_delegate_helper.so: CFLAGS += -shared -pthread
37
ifeq (${PLATFORM}, darwin)
38
mysql_delegate_helper.so: CFLAGS += -dynamiclib
39
endif
40
mysql_delegate_helper.so: LDFLAGS += -lmysqlclient
41
	$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
42

    
43
clean::
44
	rm -f *.so