update dev300-m58
[ooovba.git] / moz / zipped / makefile.mk
blob66d0c38bc9918e19e7cf7a7c9253e731cbfc1411
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.17 $
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=moz
35 TARGET=moz_unzip
37 # --- Settings -----------------------------------------------------
39 .INCLUDE : settings.mk
41 # --- Files --------------------------------------------------------
43 .IF "$(PREBUILD_MOZAB)" == "" || "$(SYSTEM_MOZILLA)" == "YES" || "$(WITH_MOZILLA)" == "NO"
45 dummy:
46 @echo "No need to unpack the prebuild mozab packages"
48 .ELSE # unpack mozab zips
49 .INCLUDE : target.mk
51 .IF "$(BUILD_MOZAB)"=="TRUE"
52 ALLTAR:
53 @echo "Does not need build mozab zipped!"
54 .ELSE
55 ALLTAR: \
56 $(MISC)$/unpacked_$(TARGET)_inc \
57 $(MISC)$/unpacked_$(TARGET)_lib \
58 $(BIN)$/mozruntime.zip \
59 $(MISC)$/replace_old_nss_libs
60 .ENDIF
61 .IF "$(GUI)" == "UNX"
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) $@
65 chmod -R 775 $(LB)
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)
71 .ELSE
73 $(MISC)$/unpacked_$(TARGET)_lib : $(OS)$(COM)$(CPU)lib.zip
74 unzip -o -d $(LB) $(OS)$(COM)$(CPU)lib.zip && \
75 $(TOUCH) $@
77 $(MISC)$/unpacked_$(TARGET)_inc : $(OS)$(COM)$(CPU)inc.zip
78 unzip -o -d $(INCCOM) $(OS)$(COM)$(CPU)inc.zip && $(TOUCH) $@
80 .ENDIF
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) $@
89 chmod -R 775 $(LB)
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"
100 LIBLIST =
101 BIN_RUNTIMELIST =
102 NSS_INCLUDE_LIST =
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"
118 BIN_RUNTIMELIST= \
119 $(FREEBL_LIB_OLD) \
120 nspr4 \
121 plc4 \
122 plds4 \
123 nss3 \
124 ssl3 \
125 softokn3 \
126 smime3
128 .IF "$(GUI)"=="WNT"
129 .IF "$(COM)"=="GCC"
130 LIBLIST= \
131 libnspr4.a \
132 libnss3.a \
133 libsmime3.a \
134 libplc4.a \
135 libplds4.a \
136 libssl3.a
138 .ELSE
139 LIBLIST= \
140 nspr4.lib \
141 plc4.lib \
142 plds4.lib \
143 nss3.lib \
144 ssl3.lib\
145 smime3.lib
146 .ENDIF
147 .ELSE #"$(GUI)"=="WNT"
148 LIBLIST= \
149 lib$(FREEBL_LIB_OLD)$(DLLPOST) \
150 libnspr4$(DLLPOST) \
151 libsoftokn3$(DLLPOST) \
152 libplc4$(DLLPOST) \
153 libplds4$(DLLPOST) \
154 libnss3$(DLLPOST) \
155 libssl3$(DLLPOST) \
156 libsmime3$(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
169 .ELSE
170 FREEBL=freebl3
171 .ENDIF #"$(CPU)" == "S"
173 .ELSE # "$(OS)" == "SOLARIS"
174 FREEBL=freebl3
175 .ENDIF # "$(OS)" == "SOLARIS"
178 NSS_MODULE_RUNTIME_LIST:= \
179 $(FREEBL) \
180 nspr4 \
181 nss3 \
182 nssckbi \
183 nssdbm3 \
184 nssutil3 \
185 plc4 \
186 plds4 \
187 smime3 \
188 softokn3 \
189 sqlite3 \
190 ssl3
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 &&) \
200 echo >& $(NULLDEV)
201 $(foreach,lib,$(LIBLIST) rm -f $(LB)$/$(lib) &&) \
202 echo >& $(NULLDEV)
203 $(foreach,lib,$(BIN_RUNTIMELIST) zip -d $(BIN)$/mozruntime.zip $(DLLPRE)$(lib)$(DLLPOST) &&) \
204 echo >& $(NULLDEV)
205 .IF "$(GUI)"=="WNT"
206 $(foreach,lib,$(NSS_MODULE_RUNTIME_LIST) zip -g -j $(BIN)$/mozruntime.zip $(SOLARBINDIR)$/$(DLLPRE)$(lib)$(DLLPOST) &&) \
207 echo >& $(NULLDEV)
208 .ELSE
209 $(foreach,lib,$(NSS_MODULE_RUNTIME_LIST) zip -g -j $(BIN)$/mozruntime.zip $(SOLARLIBDIR)$/$(DLLPRE)$(lib)$(DLLPOST) &&) \
210 echo >& $(NULLDEV)
211 .ENDIF
212 $(TOUCH) $@
214 .ENDIF # unpack mozab zips