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 #*************************************************************************
37 # --- Settings -----------------------------------------------------
39 .INCLUDE
: settings.mk
41 # --- Files --------------------------------------------------------
43 .IF
"$(PREBUILD_MOZAB)" == "" ||
"$(SYSTEM_MOZILLA)" == "YES" ||
"$(WITH_MOZILLA)" == "NO"
46 @echo
"No need to unpack the prebuild mozab packages"
48 .ELSE
# unpack mozab zips
51 .IF
"$(BUILD_MOZAB)"=="TRUE"
53 @echo
"Does not need build mozab zipped!"
56 $(MISC
)$/unpacked_
$(TARGET
)_inc \
57 $(MISC
)$/unpacked_
$(TARGET
)_lib \
58 $(BIN
)$/mozruntime.zip \
59 $(MISC
)$/replace_old_nss_libs
63 $(MISC
)$/unpacked_
%_lib
: $(OS
)$(COM
)$(CPU
)lib.zip
'$(OS)$(COM)$(CPU)runtime.zip'
64 unzip
-o
-d
$(LB
) $(OS
)$(COM
)$(CPU
)lib.zip
&& unzip
-o
-d
$(LB
) $(OS
)$(COM
)$(CPU
)runtime.zip
&& $(TOUCH
) $@
67 $(MISC
)$/unpacked_
%_inc
: $(OS
)$(COM
)$(CPU
)inc.zip
68 unzip
-o
-d
$(INCCOM
) $(OS
)$(COM
)$(CPU
)inc.zip
&& $(TOUCH
) $@
69 chmod
-R
775 $(INCCOM
)
73 $(MISC
)$/unpacked_
$(TARGET
)_lib
: $(OS
)$(COM
)$(CPU
)lib.zip
74 unzip
-o
-d
$(LB
) $(OS
)$(COM
)$(CPU
)lib.zip
&& \
77 $(MISC
)$/unpacked_
$(TARGET
)_inc
: $(OS
)$(COM
)$(CPU
)inc.zip
78 unzip
-o
-d
$(INCCOM
) $(OS
)$(COM
)$(CPU
)inc.zip
&& $(TOUCH
) $@
82 $(BIN
)$/mozruntime
%zip
: $(OS
)$(COM
)$(CPU
)runtime.zip
83 $(COPY
) $(OS
)$(COM
)$(CPU
)runtime.zip
$(BIN
)$/mozruntime.zip
85 # add alternative rules for universal binary moz-zips
86 .IF
"$(GUIBASE)" == "aqua"
87 $(MISC
)$/unpacked_
%_lib
: $(OS
)$(COM
)UBlib.zip
'$(OS)$(COM)UBruntime.zip'
88 unzip
-o
-d
$(LB
) $(OS
)$(COM
)UBlib.zip
&& unzip
-o
-d
$(LB
) $(OS
)$(COM
)UBruntime.zip
&& $(TOUCH
) $@
91 $(MISC
)$/unpacked_
%_inc
: $(OS
)$(COM
)UBinc.zip
92 unzip
-o
-d
$(INCCOM
) $(OS
)$(COM
)UBinc.zip
&& $(TOUCH
) $@
93 chmod
-R
775 $(INCCOM
)
95 $(BIN
)$/mozruntime
%zip
: $(OS
)$(COM
)UBruntime.zip
96 $(COPY
) $(OS
)$(COM
)UBruntime.zip
$(BIN
)$/mozruntime.zip
98 .ENDIF
# "$(GUIBASE)"=="aqua"
103 NSS_MODULE_RUNTIME_LIST
=
104 .IF
"$(ENABLE_NSS_MODULE)"=="YES"
105 # The prebuilt moz files include all the old NSS stuff from moz and not the new
106 # NSS libs, headers, etc, from the separate nss module. If we use the nss module
107 # then we must take care not to deliver the old NSS stuff from the "prebuilts"
108 .IF
"$(GUI)" == "WNT"
109 FREEBL_LIB_OLD
=freebl3
110 .ELSE
# "$(GUI)" == "WNT"
111 .IF
"$(OS)$(CPUNAME)" == "SOLARISSPARC"
112 FREEBL_LIB_OLD
=freebl_32fpu_3
113 .ELSE
# "$(OS)$(CPUNAME)" == "SOLARISSPARC"
114 FREEBL_LIB_OLD
=freebl3
115 .ENDIF
# "$(OS)$(CPUNAME)" == "SOLARISSPARC"
116 .ENDIF
# "$(GUI)" == "WNT"
147 .ELSE
#"$(GUI)"=="WNT"
149 lib
$(FREEBL_LIB_OLD
)$(DLLPOST
) \
151 libsoftokn3
$(DLLPOST
) \
158 .ENDIF
# .IF "$(GUI)"=="WNT"
161 NSS_INCLUDE_LIST
= nspr nss
164 .IF
"$(OS)" == "SOLARIS"
165 .IF
"$(CPU)" == "S" #32bit
166 FREEBL
=freebl_32fpu_3 freebl_32int64_3 freebl_32int_3
167 .ELIF
"$(CPU)" == "U" #64bit unxsolu4
168 FREEBL
=freebl_64int_3 freebl_64fpu_3
171 .ENDIF
#"$(CPU)" == "S"
173 .ELSE
# "$(OS)" == "SOLARIS"
175 .ENDIF
# "$(OS)" == "SOLARIS"
178 NSS_MODULE_RUNTIME_LIST
:= \
193 .ENDIF
#.IF "$(ENABLE_NSS_MODULE)"=="YES"
194 # Remove the nss libs build in moz and those build in the nss module
195 $(MISC
)$/replace_old_nss_libs
: $(MISC
)$/unpacked_
$(TARGET
)_lib \
196 $(MISC
)$/unpacked_
$(TARGET
)_inc
$(BIN
)$/mozruntime.zip
197 +$(foreach,dir,$(NSS_INCLUDE_LIST
) $(RENAME
:s
/+//) $(INCCOM
)$/$(dir) \
198 $(INCCOM
)$/$(dir)_remove_me
&&) echo
>& $(NULLDEV
)
199 $(foreach,dir,$(NSS_INCLUDE_LIST
) rm -r
-f
$(INCCOM
)$/$(dir)_remove_me
&&) \
201 $(foreach,lib
,$(LIBLIST
) rm -f
$(LB
)$/$(lib
) &&) \
203 $(foreach,lib
,$(BIN_RUNTIMELIST
) zip
-d
$(BIN
)$/mozruntime.zip
$(DLLPRE
)$(lib
)$(DLLPOST
) &&) \
206 $(foreach,lib
,$(NSS_MODULE_RUNTIME_LIST
) zip
-g
-j
$(BIN
)$/mozruntime.zip
$(SOLARBINDIR
)$/$(DLLPRE
)$(lib
)$(DLLPOST
) &&) \
209 $(foreach,lib
,$(NSS_MODULE_RUNTIME_LIST
) zip
-g
-j
$(BIN
)$/mozruntime.zip
$(SOLARLIBDIR
)$/$(DLLPRE
)$(lib
)$(DLLPOST
) &&) \
214 .ENDIF
# unpack mozab zips