1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 # Copyright 2008 by Sun Microsystems, Inc.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # $RCSfile: makefile.mk,v $
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 #*************************************************************************
49 # --- Settings -----------------------------------------------------
51 .INCLUDE
: settings.mk
53 CFLAGS
+= $(LFS_CFLAGS
)
54 CXXFLAGS
+= $(LFS_CFLAGS
)
58 # --- Files --------------------------------------------------------
60 # disable check for PIC code as it would complain about
61 # hand coded assembler
66 LIB1TARGET
=$(SLB
)$/$(TARGET
).lib
74 #LIB1FILES+=$(SLB)$/systoolsunx.lib
78 LIB3TARGET
=$(LB
)$/a
$(TARGET
).lib
79 LIB3ARCHIV
=$(LB
)$/lib
$(TARGET
)$(DLLPOSTFIX
).a
87 #LIB3FILES+=$(LB)$/systoolsunx.lib
90 .IF
"$(GUI)" == "WNT" ||
"$(GUI)"=="OS2"
93 SHL1TARGET
= uno_
$(TARGET
)
95 SHL1IMPLIB
= i
$(TARGET
)
96 SHL1VERSIONMAP
= $(TARGET
).map
102 UWINAPILIB
= -luwinapi
104 UWINAPILIB
= $(LB
)$/uwinapi.lib
123 .IF
"$(OS)"=="SOLARIS"
124 # libposix4.so (SunOS 5.6) <-> librt.so (SunOS >= 5.7)
125 SHL1STDLIBS
= -Bdynamic
-ldl
-lpthread
-lposix4
-lsocket
-lnsl
126 .IF
"$(COM)" == "C50"
127 SHL1STDLIBS
+= -z allextract
-staticlib
=Crun
-z defaultextract
136 SHL1STDLIBS
=pthread.lib
139 # If we compile sal with STLport checking iterators
140 # we need to link against the STLport
141 .IF
"$(USE_STLP_DEBUG)" != ""
142 SHL1STDLIBS
+=$(LIBSTLPORT
)
145 #The irony that using the system STL instead of
146 #stlport requires that we link libsal with the
147 #LIBSTLPORT alias which is not required when using
148 #stlport is not lost on me
149 .IF
"$(USE_SYSTEM_STL)"=="YES"
150 SHL1STDLIBS
+=$(LIBSTLPORT
)
153 .IF
"$(OS)"=="MACOSX"
154 SHL1STDLIBS
+=-framework CoreFoundation
-framework Carbon
157 .IF
"$(OS)" == "LINUX"
158 .IF
"$(PAM_LINK)" == "YES"
161 .IF
"$(CRYPT_LINK)" == "YES"
166 SHL1LIBS
+=$(SLB
)$/$(TARGET
).lib
168 .IF
"$(linkinc)" != ""
169 SHL11FILE
=$(MISC
)$/sal.slo
174 .IF
"$(GUI)$(COM)"!="WNTGCC"
182 SHL1DEF
= $(MISC
)$/$(SHL1TARGET
).def
184 DEF1NAME
= $(SHL1TARGET
)
187 # This part builds a tiny extra lib,
188 # containing an alloc.c which uses system
189 # heap instead of our own mem management.
190 # This is e.g. useful for proper valgrinding
195 TARGET2
= salalloc_malloc
196 SHL2TARGET
= $(TARGET2
)
197 SHL2IMPLIB
= i
$(TARGET2
)
198 SHL2VERSIONMAP
= salalloc.map
200 SHL2LIBS
+=$(SLB
)$/SYSALLOC_cpprtl.lib
202 .ENDIF
# .IF "$(OS)"=="LINUX"
204 # --- Coverage -----------------------------------------------------
205 # LLA: 20040304 The follows lines are an additional which is only need if we run
206 # coverage tests. For normal test runs this feature is not used.
207 # For more information about coverage tests see:
208 # http://gcc.gnu.org/onlinedocs/gcc-3.0/gcc_8.html
210 # Why this additional?
211 # Anybody has decide to link sal with g++ instead of gcc.
213 .IF
"$(TESTCOVERAGE)"!=""
223 SHL4DEPN
+=$(SHL1TARGETN
)
224 SHL4LIBS
=$(SLB
)$/textenc_tables.lib
225 SHL4TARGET
=uno_sal_textenc
226 SHL4STDLIBS
=$(SALLIB
)
227 SHL4VERSIONMAP
=saltextenc.map
229 SHL4DEF
=$(MISC
)$/$(SHL4TARGET
).def
230 DEF4NAME
=$(SHL4TARGET
)
232 # --- Targets ------------------------------------------------------
234 .ENDIF
# $(header) != ""
235 .ENDIF
# $(depend) != ""
239 .IF
"$(SHL1TARGETN)" != ""
240 $(SHL1TARGETN
) : $(OUT
)$/inc
$/udkversion.h
241 .ENDIF
# "$(SHL1TARGETN)" != ""
243 .IF
"$(GUI)"=="UNX" ||
"$(USE_SHELL)"!="4nt"
245 $(OUT
)$/inc
$/udkversion.h
:
246 echo
'#ifndef _SAL_UDKVERSION_H_' > $@
247 echo
'#define _SAL_UDKVERSION_H_' >> $@
249 echo
'#define SAL_UDK_MAJOR "$(UDK_MAJOR)"' >> $@
250 echo
'#define SAL_UDK_MINOR "$(UDK_MINOR)"' >> $@
251 echo
'#define SAL_UDK_MICRO "$(UDK_MICRO)"' >> $@
257 $(OUT
)$/inc
$/udkversion.h
:
258 echo
#ifndef _SAL_UDKVERSION_H_ > $@
259 echo
#define _SAL_UDKVERSION_H_ >> $@
261 echo
#define SAL_UDK_MAJOR "$(UDK_MAJOR)" >> $@
262 echo
#define SAL_UDK_MINOR "$(UDK_MINOR)" >> $@
263 echo
#define SAL_UDK_MICRO "$(UDK_MICRO)" >> $@