sync master with lastest vba changes
[ooovba.git] / berkeleydb / makefile.mk
blob6167dcfb1f8bf9fd75c2d28d18f8b00e66a21367
1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # Copyright 2008 by Sun Microsystems, Inc.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # $RCSfile: makefile.mk,v $
11 # $Revision: 1.48 $
13 # This file is part of OpenOffice.org.
15 # OpenOffice.org is free software: you can redistribute it and/or modify
16 # it under the terms of the GNU Lesser General Public License version 3
17 # only, as published by the Free Software Foundation.
19 # OpenOffice.org is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU Lesser General Public License version 3 for more details
23 # (a copy is included in the LICENSE file that accompanied this code).
25 # You should have received a copy of the GNU Lesser General Public License
26 # version 3 along with OpenOffice.org. If not, see
27 # <http://www.openoffice.org/license.html>
28 # for a copy of the LGPLv3 License.
30 #*************************************************************************
32 PRJ=.
34 PRJNAME=so_berkeleydb
35 TARGET=so_berkeleydb
37 # --- Settings -----------------------------------------------------
39 .INCLUDE : settings.mk
41 .IF "$(SYSTEM_DB)" == "YES"
42 all:
43 @echo "An already available installation of db should exist on your system."
44 @echo "Therefore the version provided here does not need to be built in addition."
45 .ENDIF
47 # --- Files --------------------------------------------------------
49 TARFILE_NAME=db-4.2.52.NC-custom
50 TARFILE_ROOTDIR=db-4.2.52.NC
52 ADDITIONAL_FILES= \
53 makefile.mk btree$/makefile.mk clib$/makefile.mk common$/makefile.mk \
54 cxx$/makefile.mk db$/makefile.mk dbm$/makefile.mk dbreg$/makefile.mk \
55 db_printlog$/makefile.mk env$/makefile.mk fileops$/makefile.mk hash$/makefile.mk \
56 hmac$/makefile.mk hsearch$/makefile.mk lock$/makefile.mk \
57 log$/makefile.mk mp$/makefile.mk mutex$/makefile.mk os$/makefile.mk \
58 os_win32$/makefile.mk qam$/makefile.mk rep$/makefile.mk txn$/makefile.mk \
59 xa$/makefile.mk libdb42.dxp db_4_2_gcc3.map
63 # not needed for win32. comment out when causing problems...
64 .IF "$(GUI)$(COM)"=="WNTGCC"
65 PATCH_FILE_NAME=db-4.2.52-mingw.patch
66 .ELSE
67 PATCH_FILE_NAME=db-4.2.52.patch
68 .ENDIF
70 # clean compiler flags
71 CFLAGS:=
72 CXXFLAGS:=
74 # disable aliasing for all GCC platforms, at least GCC 4.x needs it if
75 # optimization level >= 2
76 .IF "$(COM)"=="GCC"
77 CFLAGS:=-fno-strict-aliasing $(EXTRA_CFLAGS)
78 CXXFLAGS:=-fno-strict-aliasing $(EXTRA_CFLAGS)
79 .ENDIF
81 .IF "$(GUI)"=="UNX"
82 .IF "$(OS)$(COM)"=="LINUXGCC"
83 LDFLAGS:=-Wl,-rpath,'$$$$ORIGIN' -Wl,-z,noexecstack
84 .EXPORT: LDFLAGS
85 #The current dir when linking is unxlngi6.pro/misc/build/db-4.2.52.NC/out
86 # the map file is in unxlngi6.pro/misc/build/db-4.2.52.NC
87 LDFLAGSVERSION:= -Wl,--version-script=../db_4_2_gcc3.map
88 .EXPORT: LDFLAGSVERSION
89 .ENDIF # "$(OS)$(COM)"=="LINUXGCC"
90 .IF "$(OS)$(COM)"=="SOLARISC52"
91 #.IF "$(BUILD_TOOLS)$/cc"=="$(shell +-which cc)"
92 #CC:=$(COMPATH)$/bin$/cc
93 #CXX:=$(COMPATH)$/bin$/CC
94 #.ENDIF # "$(BUILD_TOOLS)$/cc"=="$(shell +-which cc)"
95 LDFLAGS:=$(ARCH_FLAGS) -R\''$$$$ORIGIN'\'
96 .EXPORT: LDFLAGS
97 .ENDIF # "$(OS)$(COM)"=="SOLARISC52"
98 CONFIGURE_DIR=out
99 #relative to CONFIGURE_DIR
100 CONFIGURE_ACTION= \
101 ..$/dist$/configure
102 CONFIGURE_FLAGS=--disable-cxx --enable-dynamic --enable-shared --enable-compat185
104 # just pass ARCH_FLAGS to native build
105 CFLAGS+:=$(ARCH_FLAGS)
106 CXXFLAGS+:=$(ARCH_FLAGS)
107 .EXPORT : CFLAGS CXXFLAGS
109 BUILD_DIR=$(CONFIGURE_DIR)
110 BUILD_DIR_OUT=$(CONFIGURE_DIR)
111 .IF "$(OS)"=="IRIX"
112 CONFIGURE_ACTION= $(CONFIG_SHELL) ..$/dist$/configure
113 BUILD_ACTION=gmake
114 .ELSE
115 BUILD_ACTION=make
116 .ENDIF
118 OUT2LIB=$(BUILD_DIR)$/.libs$/libdb*$(DLLPOST)
119 OUT2INC= \
120 $(BUILD_DIR)$/db.h
122 .ENDIF # "$(GUI)"=="UNX"
124 .IF "$(GUI)"=="WNT"
125 .IF "$(COM)"=="GCC"
126 CONFIGURE_DIR=out
127 #relative to CONFIGURE_DIR
128 # TODO needs clean up
129 CFLAGS+=-nostdinc -D_MT
130 CONFIGURE_ACTION=..$/dist$/configure
131 CONFIGURE_FLAGS=--enable-cxx --enable-dynamic --enable-shared --build=i586-pc-mingw32 --host=i586-pc-mingw32 --enable-mingw LN_S=ln NM="$(WRAPCMD) nm" OBJDUMP="$(WRAPCMD) objdump" JAVA="$(WRAPCMD) -env java" JAVAC="$(WRAPCMD) -env javac" CFLAGS="$(CFLAGS)" CPPFLAGS="$(INCLUDE)" LIBS="-lmingwthrd" LIBSO_LIBS="-lmingwthrd" LIBJSO_LIBS="-lmingwthrd" LIBXSO_LIBS="-lmingwthrd $(LIBSTLPORT)"
132 .IF "$(USE_MINGW)"=="cygwin"
133 CONFIGURE_FLAGS+=LDFLAGS="-no-undefined -L$(SOLARVER)/$(INPATH)/lib -L$(SOLARVER)/$(INPATH)/bin -L$(COMPATH)/lib/mingw -L$(COMPATH)/lib/w32api -L$(COMPATH)/lib"
134 .ELSE
135 CONFIGURE_FLAGS+=LDFLAGS="-no-undefined -L$(SOLARVER)/$(INPATH)/lib -L$(SOLARVER)/$(INPATH)/bin -L$(COMPATH)/lib"
136 .ENDIF
138 BUILD_DIR=$(CONFIGURE_DIR)
139 BUILD_DIR_OUT=$(CONFIGURE_DIR)
140 BUILD_ACTION=make
142 OUT2LIB=$(BUILD_DIR)$/.libs$/libdb*42.a
143 OUT2BIN=$(BUILD_DIR)$/.libs$/libdb*42.dll
145 OUT2INC= \
146 $(BUILD_DIR)$/db.h
147 .IF "$(GUI)$(COM)"=="WNTGCC"
148 .EXPORT : PWD
149 .ENDIF
151 .ELSE
152 # make use of stlport headerfiles
153 EXT_USE_STLPORT=TRUE
155 .IF "$(USE_SHELL)"!="4nt"
156 BUILD_ACTION_SEP=;
157 .ELSE # "$(USE_SHELL)"!="4nt"
158 BUILD_ACTION_SEP=^
159 .ENDIF # "$(USE_SHELL)"!="4nt"
160 BUILD_DIR=
161 BUILD_ACTION=dmake
163 BUILD_DIR_OUT=build_win32
164 #OUT2LIB= \
165 # $(BUILD_DIR_OUT)$/Release$/libdb42.lib
166 #OUT2BIN=$(BUILD_DIR_OUT)$/Release$/libdb42.dll
167 OUT2INC= \
168 $(BUILD_DIR_OUT)$/db.h
169 .ENDIF
170 .ENDIF # "$(GUI)"=="WNT"
172 # --- Targets ------------------------------------------------------
174 .INCLUDE : set_ext.mk
175 .INCLUDE : target.mk
176 .INCLUDE : tg_ext.mk