-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
137 lines (102 loc) · 2.65 KB
/
Makefile
File metadata and controls
137 lines (102 loc) · 2.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
#
# modules/dtUtils/Makefile
#
# Build the iRODS norStore module
#
ifndef buildDir
buildDir = $(CURDIR)/../..
endif
# Set this flag if you intend to build the msiSha1Data microservice
# WARNING: because of the way that iRODS works if you enable this flag
# the first time you build it MUST always be set. The problem is the
# iRODS server libraries have a reference to the module and if you
# run make with it on and then off and run a make clean you may
# have an error complaining it cannot find the sha1Data file.
# DTSSL = 1
include $(buildDir)/config/config.mk
include $(buildDir)/config/platform.mk
include $(buildDir)/config/directories.mk
include $(buildDir)/config/common.mk
#
# Directories
#
MSObjDir = $(modulesDir)/dtUtils/microservices/obj
MSSrcDir = $(modulesDir)/dtUtils/microservices/src
MSIncDir = $(modulesDir)/dtUtils/microservices/include
#
# Source files
#
sha1Dir= $(MSSrcDir)/sha1
emailDir= $(MSSrcDir)/email
#
# Object files
SHA1_OBJS= $(MSObjDir)/sha1Data.o
EMAIL_OBJS= $(MSObjDir)/semailMS.o
OBJECTS = $(EMAIL_OBJS)
ifdef DTSSL
OBJECTS += $(SHA1_OBJS)
endif
INCLUDE_FLAGS = -I$(MSIncDir)
#
# Compile and link flags
#
INCLUDES += $(INCLUDE_FLAGS) $(LIB_INCLUDES) $(SVR_INCLUDES)
CFLAGS_OPTIONS := -DRODS_SERVER $(CFLAGS) $(MY_CFLAG)
CFLAGS = $(CFLAGS_OPTIONS) $(INCLUDES) $(MODULE_CFLAGS)
ifdef DTSSL
LIBS = -lcrypto
endif
.PHONY: all rules microservices server client clean
.PHONY: server_ldflags client_ldflags server_cflags client_cflags
.PHONY: print_cflags
# Build everything
all: microservices
@true
# List module's objects for inclusion in the clients
client_ldflags:
@true
# List module's includes for inclusion in the clients
client_cflags:
@true
# List module's objects for inclusion in the server
server_ldflags:
@echo $(OBJECTS) $(LIBS)
# List module's includes for inclusion in the server
server_cflags:
@echo $(INCLUDE_FLAGS)
# Build microservices
microservices: print_cflags $(OBJECTS)
@true
# Build client additions
client:
@true
# Build server additions
server:
@true
# Build rules
rules:
@true
# Clean
clean:
@echo "Clean dtUtils module..."
@rm -f $(OBJECTS)
# Show compile flags
print_cflags:
@echo "Compile flags:"
@echo " $(CFLAGS_OPTIONS)"
#
# Compilation targets
#
ifdef DTSSL
$(SHA1_OBJS): $(MSObjDir)/%.o: $(sha1Dir)/%.c $(DEPEND)
@echo "Compile dtUtils module `basename $@`..."
@$(CC) -c $(CFLAGS) -o $@ $<
$(EMAIL_OBJS): $(MSObjDir)/%.o: $(emailDir)/%.c $(DEPEND)
@echo "Compile dtUtils module `basename $@`..."
@$(CC) -c $(CFLAGS) -o $@ $<
endif
ifndef DTSSL
$(EMAIL_OBJS): $(MSObjDir)/%.o: $(emailDir)/%.c $(DEPEND)
@echo "Compile dtUtils module `basename $@`..."
@$(CC) -c $(CFLAGS) -o $@ $<
endif