Statistics
| Branch: | Revision:

grapes / src / CloudSupport / Makefile @ d116c3e0

History | View | Annotate | Download (1.07 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
libs3_delegate_helper.so: ../net_helper$(NH_INCARNATION).o $(UTILS_DIR)/request_handler.o $(UTILS_DIR)/fifo_queue.o ../config.o
22
libs3_delegate_helper.so: CFLAGS += -shared -pthread
23
libs3_delegate_helper.so: LDFLAGS += -ls3
24
libs3_delegate_helper.so: libs3_delegate_helper.o
25
	$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
26

    
27
libs3_delegate_helper.o: CFLAGS += -fPIC
28

    
29
mysql_delegate_helper.so: ../net_helper$(NH_INCARNATION).o $(UTILS_DIR)/fifo_queue.o $(UTILS_DIR)/request_handler.o ../config.o
30
mysql_delegate_helper.so: CFLAGS += -shared -pthread
31
mysql_delegate_helper.so: LDFLAGS += -lmysqlclient
32
mysql_delegate_helper.so: mysql_delegate_helper.o
33
	$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
34

    
35
mysql_delegate_helper.o: CFLAGS += -fPIC
36

    
37

    
38

    
39
clean::
40
	rm -f *.so