makefile.mk (cdf0e10c) | makefile.mk (24687b4c) |
---|---|
1#************************************************************************* 2# 3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4# 5# Copyright 2008 by Sun Microsystems, Inc. 6# 7# OpenOffice.org - a multi-platform office productivity suite 8# --- 98 unchanged lines hidden (view full) --- 107CFLAGS+=-DSYSTEM_MYSQL 108.ENDIF 109 110.IF "$(SYSTEM_MYSQL_CPPCONN)" == "YES" 111CFLAGS+=-DSYSTEM_MYSQL_CPPCONN 112.ENDIF 113 114CDEFS+=-DCPPDBC_EXPORTS -DCPPCONN_LIB_BUILD | 1#************************************************************************* 2# 3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4# 5# Copyright 2008 by Sun Microsystems, Inc. 6# 7# OpenOffice.org - a multi-platform office productivity suite 8# --- 98 unchanged lines hidden (view full) --- 107CFLAGS+=-DSYSTEM_MYSQL 108.ENDIF 109 110.IF "$(SYSTEM_MYSQL_CPPCONN)" == "YES" 111CFLAGS+=-DSYSTEM_MYSQL_CPPCONN 112.ENDIF 113 114CDEFS+=-DCPPDBC_EXPORTS -DCPPCONN_LIB_BUILD |
115.IF "$(SYSTEM_MYSQL_CPPCONN)" != "YES" 116CDEFS += -DCPPCONN_LIB=\"$(DLLPRE)mysqlcppconn$(DLLPOST)\" 117.ELSE | 115.IF "$(SYSTEM_MYSQL_CPPCONN)" == "YES" |
118CDEFS += -DCPPCONN_LIB=\"$(shell readlink /usr/lib/libmysqlcppconn.so)\" 119.IF "$(USE_SYSTEM_STL)"!="YES" 120CDEFS += -DADAPT_EXT_STL 121.ENDIF 122.ENDIF 123 124# --------------- MySQL settings ------------------ | 116CDEFS += -DCPPCONN_LIB=\"$(shell readlink /usr/lib/libmysqlcppconn.so)\" 117.IF "$(USE_SYSTEM_STL)"!="YES" 118CDEFS += -DADAPT_EXT_STL 119.ENDIF 120.ENDIF 121 122# --------------- MySQL settings ------------------ |
125.IF "$(GUI)"=="WNT" 126 MYSQL_INC=-I$(SOLARINCDIR)$/mysqlcppconn -I$(SOLARINCDIR)$/mysqlcppconn/cppconn -I$(MYSQL_INCDIR) 127 MYSQL_LIB=$(MYSQL_LIBDIR)$/libmysql.lib 128 MYSQL_LIBFILE=$(MYSQL_LIBDIR)$/libmysql.dll 129 MYSQL_CPPCONNFILE=$(SOLARBINDIR)$/$(DLLPRE)mysqlcppconn$(DLLPOST) 130.ELSE | 123.IF "$(GUI)"!="WNT" |
131 .IF "$(SYSTEM_MYSQL)" != "YES" 132 MYSQL_INC+=-I$(MYSQL_INCDIR) 133 .IF "$(OS)"=="MACOSX" 134 MYSQL_LIBFILE=$(MYSQL_LIBDIR)$/$(DLLPRE)mysql.16$(DLLPOST) 135 .ELSE 136 MYSQL_LIBFILE=$(MYSQL_LIBDIR)$/$(DLLPRE)mysql$(DLLPOST).16 137 .ENDIF 138 139 # checkdll will complain if we do not point it to the libmysql lib 140 EXTRALIBPATHS=-L$(MYSQL_LIBDIR) 141 .ENDIF 142 | 124 .IF "$(SYSTEM_MYSQL)" != "YES" 125 MYSQL_INC+=-I$(MYSQL_INCDIR) 126 .IF "$(OS)"=="MACOSX" 127 MYSQL_LIBFILE=$(MYSQL_LIBDIR)$/$(DLLPRE)mysql.16$(DLLPOST) 128 .ELSE 129 MYSQL_LIBFILE=$(MYSQL_LIBDIR)$/$(DLLPRE)mysql$(DLLPOST).16 130 .ENDIF 131 132 # checkdll will complain if we do not point it to the libmysql lib 133 EXTRALIBPATHS=-L$(MYSQL_LIBDIR) 134 .ENDIF 135 |
143 .IF "$(SYSTEM_MYSQL_CPPCONN)" != "YES" 144 .IF "$(OS)"=="MACOSX" || "$(OS)" == "SOLARIS" 145 MYSQL_LIB+=-lz -lm 146 .ELSE 147 MYSQL_LIB+=-rdynamic -lz -lcrypt -lnsl -lm 148 .ENDIF 149 MYSQL_CPPCONNFILE=$(SOLARLIBDIR)$/$(DLLPRE)mysqlcppconn$(DLLPOST) 150 .ELSE | |
151 MYSQL_CPPCONN_LIB+=-lmysqlcppconn | 136 MYSQL_CPPCONN_LIB+=-lmysqlcppconn |
152 .ENDIF | |
153.ENDIF 154 | 137.ENDIF 138 |
155.IF "$(SYSTEM_MYSQL_CPPCONN)" != "YES" 156 MYSQL_INC+=-I$(SOLARINCDIR)$/mysqlcppconn -I$(SOLARINCDIR)$/mysqlcppconn/cppconn 157.ENDIF 158 | |
159CFLAGS+=-I..$/..$/inc $(MYSQL_INC) \ 160 -DMYSQLC_VERSION_MAJOR=$(MYSQLC_VERSION_MAJOR) \ 161 -DMYSQLC_VERSION_MINOR=$(MYSQLC_VERSION_MINOR) \ 162 -DMYSQLC_VERSION_MICRO=$(MYSQLC_VERSION_MICRO) \ 163 $(MYSQL_DEFINES) 164 165# provide the name of the MySQL client lib to the C++ code 166.IF "$(SYSTEM_MYSQL)" != "YES" --- 86 unchanged lines hidden (view full) --- 253 254# ........ dependencies for packaging the extension ........ 255EXTENSION_PACKDEPS=makefile.mk $(COMPONENT_IMAGES) $(COMPONENT_DESCRIPTIONS_PACKDEP) $(COMPONENT_MERGED_XCU) 256 257.IF "$(SYSTEM_MYSQL)" != "YES" 258EXTENSION_PACKDEPS+=$(COMPONENT_MYSQL_LIBFILE) 259.ENDIF 260 | 139CFLAGS+=-I..$/..$/inc $(MYSQL_INC) \ 140 -DMYSQLC_VERSION_MAJOR=$(MYSQLC_VERSION_MAJOR) \ 141 -DMYSQLC_VERSION_MINOR=$(MYSQLC_VERSION_MINOR) \ 142 -DMYSQLC_VERSION_MICRO=$(MYSQLC_VERSION_MICRO) \ 143 $(MYSQL_DEFINES) 144 145# provide the name of the MySQL client lib to the C++ code 146.IF "$(SYSTEM_MYSQL)" != "YES" --- 86 unchanged lines hidden (view full) --- 233 234# ........ dependencies for packaging the extension ........ 235EXTENSION_PACKDEPS=makefile.mk $(COMPONENT_IMAGES) $(COMPONENT_DESCRIPTIONS_PACKDEP) $(COMPONENT_MERGED_XCU) 236 237.IF "$(SYSTEM_MYSQL)" != "YES" 238EXTENSION_PACKDEPS+=$(COMPONENT_MYSQL_LIBFILE) 239.ENDIF 240 |
261.IF "$(SYSTEM_MYSQL_CPPCONN)" != "YES" 262EXTENSION_PACKDEPS+=$(COMPONENT_MYSQL_CPPCONN_FILE) 263.ENDIF 264 | |
265# --- Targets ------------------------------------------------------ 266.INCLUDE : extension_pre.mk 267.INCLUDE : target.mk 268.INCLUDE : extension_post.mk 269 270$(COMPONENT_IMAGES) : $(SOLARSRC)$/$(RSCDEFIMG)$/desktop$/res$/$$(@:f) 271 @@-$(MKDIRHIER) $(@:d) 272 $(COPY) $< $@ --- 39 unchanged lines hidden (view full) --- 312$(COMPONENT_MYSQL_LIBFILE): $(MYSQL_LIBFILE) 313 @@-$(MKDIRHIER) $(@:d) 314 @$(COPY) $< $@ > $(NULLDEV) 315 .IF "$(OS)" == "MACOSX" 316 install_name_tool -id @__________________________________________________OOO/$(MYSQL_LIBFILE:f) $@ 317 .ENDIF 318.ENDIF 319 | 241# --- Targets ------------------------------------------------------ 242.INCLUDE : extension_pre.mk 243.INCLUDE : target.mk 244.INCLUDE : extension_post.mk 245 246$(COMPONENT_IMAGES) : $(SOLARSRC)$/$(RSCDEFIMG)$/desktop$/res$/$$(@:f) 247 @@-$(MKDIRHIER) $(@:d) 248 $(COPY) $< $@ --- 39 unchanged lines hidden (view full) --- 288$(COMPONENT_MYSQL_LIBFILE): $(MYSQL_LIBFILE) 289 @@-$(MKDIRHIER) $(@:d) 290 @$(COPY) $< $@ > $(NULLDEV) 291 .IF "$(OS)" == "MACOSX" 292 install_name_tool -id @__________________________________________________OOO/$(MYSQL_LIBFILE:f) $@ 293 .ENDIF 294.ENDIF 295 |
320.IF "$(SYSTEM_MYSQL_CPPCONN)" != "YES" 321# --- the MySQL cppconn lib needs to be copied 322$(COMPONENT_MYSQL_CPPCONN_FILE): $(MYSQL_CPPCONNFILE) 323 @@-$(MKDIRHIER) $(@:d) 324 @$(COPY) $< $@ > $(NULLDEV) 325 .IF "$(OS)" == "MACOSX" 326 install_name_tool -change $(MYSQL_LIBFILE:f) @loader_path/$(MYSQL_LIBFILE:f) $@ 327 .ENDIF 328.ENDIF 329 | |
330.IF "$(OS)" == "MACOSX" 331$(EXTENSION_TARGET): adjust_libmysql_path 332 333adjust_libmysql_path: $(EXTENSIONDIR)$/$(SHL1TARGET)$(DLLPOST) 334 install_name_tool -change $(MYSQL_LIBFILE:f) @loader_path/$(MYSQL_LIBFILE:f) $(EXTENSIONDIR)$/$(SHL1TARGET)$(DLLPOST) 335.ENDIF | 296.IF "$(OS)" == "MACOSX" 297$(EXTENSION_TARGET): adjust_libmysql_path 298 299adjust_libmysql_path: $(EXTENSIONDIR)$/$(SHL1TARGET)$(DLLPOST) 300 install_name_tool -change $(MYSQL_LIBFILE:f) @loader_path/$(MYSQL_LIBFILE:f) $(EXTENSIONDIR)$/$(SHL1TARGET)$(DLLPOST) 301.ENDIF |