-
Notifications
You must be signed in to change notification settings - Fork 2
/
GNUmakefile
232 lines (206 loc) · 7.22 KB
/
GNUmakefile
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
ifeq ($(GNUSTEP_MAKEFILES),)
GNUSTEP_MAKEFILES := $(shell gnustep-config --variable=GNUSTEP_MAKEFILES 2>/dev/null)
ifeq ($(GNUSTEP_MAKEFILES),)
$(warning )
$(warning Unable to obtain GNUSTEP_MAKEFILES setting from gnustep-config!)
$(warning Perhaps gnustep-make is not properly installed,)
$(warning so gnustep-config is not in your PATH.)
$(warning )
$(warning Your PATH is currently $(PATH))
$(warning )
endif
endif
ifeq ($(GNUSTEP_MAKEFILES),)
$(error You need to set GNUSTEP_MAKEFILES before compiling!)
endif
include $(GNUSTEP_MAKEFILES)/common.make
# Force sequential build to prevent different versions of the same
# bundle overwriting each other's temporary files during building.
GNUSTEP_MAKE_PARALLEL_BUILDING=no
-include config.make
PACKAGE_NAME = SQLClient
PACKAGE_VERSION = 1.9.0
CVS_MODULE_NAME = gnustep/dev-libs/SQLClient
CVS_TAG_NAME = SQLClient
SVN_BASE_URL=svn+ssh://svn.gna.org/svn/gnustep/libs
SVN_MODULE_NAME=sqlclient
NEEDS_GUI = NO
TEST_TOOL_NAME=
LIBRARY_NAME=SQLClient
DOCUMENT_NAME=SQLClient
SQLClient_INTERFACE_VERSION=1.9
SQLClient_OBJC_FILES = SQLClient.m SQLClientPool.m
SQLClient_LIBRARIES_DEPEND_UPON = -lPerformance $(FND_LIBS) $(OBJC_LIBS)
SQLClient_HEADER_FILES = SQLClient.h
SQLClient_AGSDOC_FILES = SQLClient.h
SQLClient_AGSDOC_FLAGS = -WordMap '{SQLCLIENT_PRIVATE="";}'
# Optional Java wrappers for the library
JAVA_WRAPPER_NAME = SQLClient
SQLClient_HEADER_FILES_INSTALL_DIR = SQLClient
BUNDLE_NAME=
BUNDLE_INSTALL_DIR=$(GNUSTEP_BUNDLES)/SQLClient$(SQLClient_INTERFACE_VERSION)
# In some systems and situations the dynamic linker needs to haved the
# SQLClient, gnustep-base, and objc libraries explicityly linked into
# the bundle, but in others it requires them to not be linked.
# To handle that, we create two versions of each bundle, the seond version
# has _libs appended to the bundle name, and has the extra libraries linked.
ifeq ($(LINKSQLCLIENT),)
LINKSQLCLIENT=0
ifeq ($(findstring darwin, $(GNUSTEP_TARGET_OS)), darwin)
LINKSQLCLIENT=1
endif
endif
ifneq ($(ECPG),)
ifeq ($(LINKSQLCLIENT),1)
BUNDLE_NAME += ECPG
ECPG_OBJC_FILES = ECPG.m
ECPG_LIB_DIRS = -L./$(GNUSTEP_OBJ_DIR)
ECPG_BUNDLE_LIBS += -lSQLClient -lecpg
ECPG_PRINCIPAL_CLASS = SQLClientECPG
else
BUNDLE_NAME += ECPG
ECPG_OBJC_FILES = ECPG.m
ECPG_LIB_DIRS = -L./$(GNUSTEP_OBJ_DIR)
ECPG_BUNDLE_LIBS += -lecpg
ECPG_PRINCIPAL_CLASS = SQLClientECPG
BUNDLE_NAME += ECPG_libs
ECPG_libs_OBJC_FILES = ECPG.m
ECPG_libs_LIB_DIRS = -L./$(GNUSTEP_OBJ_DIR)
ECPG_libs_BUNDLE_LIBS += -lSQLClient -lPerformance \
$(FND_LIBS) $(OBJC_LIBS) -lecpg
ECPG_libs_PRINCIPAL_CLASS = SQLClientECPG_libs
endif
TEST_TOOL_NAME += testECPG
testECPG_OBJC_FILES = testECPG.m
testECPG_LIB_DIRS += -L./$(GNUSTEP_OBJ_DIR)
testECPG_TOOL_LIBS += -lSQLClient -lPerformance
endif
ifneq ($(POSTGRES),)
ifeq ($(LINKSQLCLIENT),1)
BUNDLE_NAME += Postgres
Postgres_OBJC_FILES = Postgres.m
Postgres_LIB_DIRS = -L./$(GNUSTEP_OBJ_DIR)
Postgres_BUNDLE_LIBS += -lSQLClient -lpq
Postgres_PRINCIPAL_CLASS = SQLClientPostgres
else
BUNDLE_NAME += Postgres
Postgres_OBJC_FILES = Postgres.m
Postgres_LIB_DIRS = -L./$(GNUSTEP_OBJ_DIR)
Postgres_BUNDLE_LIBS += -lpq
Postgres_PRINCIPAL_CLASS = SQLClientPostgres
BUNDLE_NAME += Postgres_libs
Postgres_libs_OBJC_FILES = Postgres.m
Postgres_libs_LIB_DIRS = -L./$(GNUSTEP_OBJ_DIR)
Postgres_libs_BUNDLE_LIBS += -lSQLClient -lPerformance \
$(FND_LIBS) $(OBJC_LIBS) -lpq
Postgres_libs_PRINCIPAL_CLASS = SQLClientPostgres_libs
endif
TEST_TOOL_NAME += testPostgres
testPostgres_OBJC_FILES = testPostgres.m
testPostgres_LIB_DIRS += -L./$(GNUSTEP_OBJ_DIR)
testPostgres_TOOL_LIBS += -lSQLClient -lPerformance
endif
ifneq ($(JDBC),)
ifeq ($(LINKSQLCLIENT),1)
BUNDLE_NAME += JDBC
JDBC_OBJC_FILES = JDBC.m
JDBC_LIB_DIRS = -L./$(GNUSTEP_OBJ_DIR) $(JDBC_VM_LIBDIRS)
JDBC_BUNDLE_LIBS += -lSQLClient $(JDBC_VM_LIBS)
JDBC_PRINCIPAL_CLASS = SQLClientJDBC
else
BUNDLE_NAME += JDBC
JDBC_OBJC_FILES = JDBC.m
JDBC_LIB_DIRS = -L./$(GNUSTEP_OBJ_DIR) $(JDBC_VM_LIBDIRS)
JDBC_BUNDLE_LIBS += $(JDBC_VM_LIBS)
JDBC_PRINCIPAL_CLASS = SQLClientJDBC
BUNDLE_NAME += JDBC_libs
JDBC_libs_OBJC_FILES = JDBC.m
JDBC_libs_LIB_DIRS = -L./$(GNUSTEP_OBJ_DIR) $(JDBC_VM_LIBDIRS)
JDBC_libs_BUNDLE_LIBS += -lSQLClient -lPerformance \
$(FND_LIBS) $(OBJC_LIBS) $(JDBC_VM_LIBS)
JDBC_libs_PRINCIPAL_CLASS = SQLClientJDBC_libs
endif
TEST_TOOL_NAME += testJDBC
testJDBC_OBJC_FILES = testJDBC.m
testJDBC_LIB_DIRS += -L./$(GNUSTEP_OBJ_DIR)
testJDBC_TOOL_LIBS += -lSQLClient -lPerformance
endif
ifneq ($(MYSQL),)
ifeq ($(LINKSQLCLIENT),1)
BUNDLE_NAME += MySQL
MySQL_OBJC_FILES = MySQL.m
MySQL_LIB_DIRS = -L./$(GNUSTEP_OBJ_DIR)
MySQL_BUNDLE_LIBS += -lSQLClient -lmysqlclient
MySQL_PRINCIPAL_CLASS = SQLClientMySQL
else
BUNDLE_NAME += MySQL
MySQL_OBJC_FILES = MySQL.m
MySQL_LIB_DIRS = -L./$(GNUSTEP_OBJ_DIR)
MySQL_BUNDLE_LIBS += -lmysqlclient
MySQL_PRINCIPAL_CLASS = SQLClientMySQL
BUNDLE_NAME += MySQL_libs
MySQL_libs_OBJC_FILES = MySQL.m
MySQL_libs_LIB_DIRS = -L./$(GNUSTEP_OBJ_DIR)
MySQL_libs_BUNDLE_LIBS += -lSQLClient -lPerformance \
$(FND_LIBS) $(OBJC_LIBS) -lmysqlclient
MySQL_libs_PRINCIPAL_CLASS = SQLClientMySQL_libs
endif
TEST_TOOL_NAME += testMySQL
testMySQL_OBJC_FILES = testMySQL.m
testMySQL_LIB_DIRS += -L./$(GNUSTEP_OBJ_DIR)
testMySQL_TOOL_LIBS += -lSQLClient -lPerformance
endif
ifneq ($(SQLITE),)
ifeq ($(LINKSQLCLIENT),1)
BUNDLE_NAME += SQLite
SQLite_OBJC_FILES = SQLite.m
SQLite_LIB_DIRS = -L./$(GNUSTEP_OBJ_DIR)
SQLite_BUNDLE_LIBS += -lSQLClient -lsqlite3
SQLite_PRINCIPAL_CLASS = SQLClientSQLite
else
BUNDLE_NAME += SQLite
SQLite_OBJC_FILES = SQLite.m
SQLite_LIB_DIRS = -L./$(GNUSTEP_OBJ_DIR)
SQLite_BUNDLE_LIBS += -lsqlite3
SQLite_PRINCIPAL_CLASS = SQLClientSQLite
BUNDLE_NAME += SQLite_libs
SQLite_libs_OBJC_FILES = SQLite.m
SQLite_libs_LIB_DIRS = -L./$(GNUSTEP_OBJ_DIR)
SQLite_libs_BUNDLE_LIBS += -lSQLClient -lPerformance \
$(FND_LIBS) $(OBJC_LIBS) -lsqlite3
SQLite_libs_PRINCIPAL_CLASS = SQLClientSQLite_libs
endif
TEST_TOOL_NAME += testSQLite
testSQLite_OBJC_FILES = testSQLite.m
testSQLite_LIB_DIRS += -L./$(GNUSTEP_OBJ_DIR)
testSQLite_TOOL_LIBS += -lSQLClient -lPerformance
endif
ifneq ($(ORACLE_HOME),)
BUNDLE_NAME += Oracle
Oracle_OBJC_FILES = Oracle.m
Oracle_LIB_DIRS = -L$(ORACLE_HOME)/lib -L./$(GNUSTEP_OBJ_DIR) \
$(shell cat $(ORACLE_HOME)/lib/ldflags)
Oracle_BUNDLE_LIBS += -lclntsh \
$(shell cat $(ORACLE_HOME)/lib/sysliblist) \
-ldl -lm
Oracle_PRINCIPAL_CLASS = SQLClientOracle
BUNDLE_NAME += Oracle_libs
Oracle_libs_OBJC_FILES = Oracle.m
Oracle_libs_LIB_DIRS = -L$(ORACLE_HOME)/lib -L./$(GNUSTEP_OBJ_DIR) \
$(shell cat $(ORACLE_HOME)/lib/ldflags)
Oracle_libs_BUNDLE_LIBS += -lclntsh \
-lSQLClient -lPerformance $(FND_LIBS) $(OBJC_LIBS) \
$(shell cat $(ORACLE_HOME)/lib/sysliblist) \
-ldl -lm
Oracle_libs_PRINCIPAL_CLASS = SQLClientOracle_libs
endif
-include GNUmakefile.preamble
include $(GNUSTEP_MAKEFILES)/library.make
include $(GNUSTEP_MAKEFILES)/bundle.make
# If JIGS is installed, automatically generate Java wrappers as well.
# Because of the '-', should not complain if java-wrapper.make can't be
# found ... simply skip generation of java wrappers in that case.
-include $(GNUSTEP_MAKEFILES)/java-wrapper.make
include $(GNUSTEP_MAKEFILES)/test-tool.make
include $(GNUSTEP_MAKEFILES)/documentation.make
-include GNUmakefile.postamble