Revision b68012de src/CloudSupport/Makefile

View differences:

src/CloudSupport/Makefile
9 9

  
10 10
OBJS = cloud_helper.o cloud_helper_utils.o cloud_helper_delegate.o
11 11
DELEGATE_HELPERS = libs3_delegate_helper.so mysql_delegate_helper.so
12
DELEGATE_HELPERS_DEPS = ../Utils/request_handler.o \
13
			../Utils/fifo_queue.o \
14
			../config.o \
15
			../net_helper$(NH_INCARNATION).o
12 16

  
13 17
CFLAGS += -I$(UTILS_DIR)
14 18

  
......
16 20

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

  
19
delegate_helpers: $(DELEGATE_HELPERS)
23
delegate_helpers: clean-root $(DELEGATE_HELPERS)
20 24

  
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
25
libs3_delegate_helper.so: LDFLAGS += -pthread
26
ifeq ($(PLATFORM), darwin)
27
libs3_delegate_helper.so: LDFLAGS += -dynamiclib
28
else
29
libs3_delegate_helper.so: LDFLAGS += -shared
28 30
endif
29 31
libs3_delegate_helper.so: LDFLAGS += -ls3
32
libs3_delegate_helper.so: CFLAGS += -fPIC
33
libs3_delegate_helper.so: libs3_delegate_helper.o $(DELEGATE_HELPERS_DEPS)
30 34
	$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
31 35

  
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
36
mysql_delegate_helper.so: LDFLAGS += -pthread
37
ifeq ($(PLATFORM), darwin)
38
mysql_delegate_helper.so: LDFLAGS += -dynamiclib
39
else
40
mysql_delegate_helper.so: LDFLAGS += -shared
39 41
endif
40
mysql_delegate_helper.so: LDFLAGS += -lmysqlclient
42
mysql_delegate_helper.so: LDFLAGS += -lmysql
43
mysql_delegate_helper.so: CFLAGS += -fPIC
44
mysql_delegate_helper.so: mysql_delegate_helper.o $(DELEGATE_HELPERS_DEPS)
41 45
	$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
42 46

  
47
.PHONY: clean-root
48
clean-root:
49
	$(MAKE) -C .. clean
50

  
43 51
clean::
44 52
	rm -f *.so

Also available in: Unified diff