Update ooo320-m1
[ooovba.git] / solenv / inc / tg_lib.mk
blob2fc302ac2cba8d3b58778b9dd1f36e3a21907723
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: tg_lib.mk,v $
11 # $Revision: 1.24 $
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 #######################################################
33 # Anweisungen fuer das Linken
34 # unroll begin
36 .IF "$(LIB$(TNR)TARGET)" != ""
37 .IF "$(LIB$(TNR)ARCHIV)" != ""
39 $(LIB$(TNR)ARCHIV) : $(LIB$(TNR)TARGET)
40 @echo "Making: " $(@:f)
41 @@-$(RM) $@
42 .IF "$(GUI)"=="UNX"
43 @-$(RM) $(MISC)/$(LIB$(TNR)ARCHIV:b).cmd
44 .IF "$(OS)" =="HPUX_FRAG_HR"
45 @-$(RM) $(MISC)/$(LIB$(TNR)ARCHIV:b)_closetempl.cmd
46 @echo $(LINK) +inst_close -c `cat $(LIB$(TNR)TARGET) | sed s\#'^'$(ROUT)\#$(PRJ)/$(ROUT)\#g` > $(MISC)/$(LIB$(TNR)ARCHIV:b)_closetempl.cmd
47 @cat $(MISC)/$(LIB$(TNR)ARCHIV:b)_closetempl.cmd
48 @+source $(MISC)/$(LIB$(TNR)ARCHIV:b)_closetempl.cmd
49 .ENDIF
50 @echo $(LIBMGR) $(LIB$(TNR)FLAGS) $(LIBFLAGS) $(LIB$(TNR)ARCHIV) `cat $(LIB$(TNR)TARGET) | sed s\#'^'$(ROUT)\#$(PRJ)/$(ROUT)\#g` > $(MISC)/$(LIB$(TNR)ARCHIV:b).cmd
51 .IF "$(OS)$(COM)"=="NETBSDGCC"
52 @echo ranlib $(LIB$(TNR)ARCHIV) >> $(MISC)/$(LIB$(TNR)ARCHIV:b).cmd
53 .ENDIF
54 .IF "$(OS)" == "MACOSX"
55 @echo ranlib $(LIB$(TNR)ARCHIV) >> $(MISC)/$(LIB$(TNR)ARCHIV:b).cmd
56 .ENDIF
57 .IF "$(VERBOSE)" == "TRUE"
58 @cat $(MISC)/$(LIB$(TNR)ARCHIV:b).cmd
59 .ENDIF
60 @+source $(MISC)/$(LIB$(TNR)ARCHIV:b).cmd
61 .ELSE # "$(GUI)"=="UNX"
62 .IF "$(GUI)$(COM)"=="WNTGCC"
63 @+-$(RM) $(MISC)/$(LIB$(TNR)ARCHIV:b).cmd
64 @+echo $(LIBMGR) $(LIB$(TNR)FLAGS) $(LIBFLAGS) $(LIB$(TNR)ARCHIV) `cat $(LIB$(TNR)TARGET) | sed s#'^'$(ROUT)#$(PRJ)/$(ROUT)#g` > $(MISC)/$(LIB$(TNR)ARCHIV:b).cmd
65 @+echo ranlib $(LIB$(TNR)ARCHIV) >> $(MISC)/$(LIB$(TNR)ARCHIV:b).cmd
66 .IF "$(VERBOSE)" == "TRUE"
67 @cat $(MISC)/$(LIB$(TNR)ARCHIV:b).cmd
68 .ENDIF
69 @+source $(MISC)/$(LIB$(TNR)ARCHIV:b).cmd
70 .ELSE
71 @echo just a dummy > $@
72 .ENDIF # "$(GUI)$(COM)"=="WNTGCC"
73 .ENDIF # "$(GUI)"=="UNX"
75 .ENDIF # "$(LIB$(TNR)ARCHIV)" != ""
77 $(LIB$(TNR)TARGET) : $(LIB$(TNR)FILES) \
78 $(LIB$(TNR)OBJFILES) \
79 $(LIB$(TNR)DEPN)
80 .IF "$(VERBOSE)" == "TRUE"
81 @echo using: $(LIB$(TNR)FILES)
82 @echo using: $(LIB$(TNR)TARGET)
83 @echo ------------------------------
84 .ENDIF
85 @echo "Making: " $(@:f)
86 @@-$(RM) $@
87 .IF "$(GUI)"=="UNX"
88 @echo $(LIB$(TNR)OBJFILES:s/.obj/.o/) | sed "s#$(PRJ:s/./\./)/$(ROUT)#$(ROUT)#g" | xargs -n 1 > $@
89 @cat /dev/null $(LIB$(TNR)FILES:s/.obj/.o/) | xargs -n 1 >> $@
90 @$(RM) $(@:d)$(@:b).dump
91 .IF "$(OS)"=="MACOSX"
92 @-nm `cat $(LIB$(TNR)TARGET) | sed s\#'^'$(ROUT)\#$(PRJ)/$(ROUT)\#g` > $(@:d)$(@:b).dump
93 .ELSE
94 @nm `cat $(LIB$(TNR)TARGET) | sed s\#'^'$(ROUT)\#$(PRJ)/$(ROUT)\#g` > $(@:d)$(@:b).dump
95 .ENDIF
97 .ELIF "$(GUI)"=="OS2"
98 $(COMMAND_ECHO)$(LIBMGR) $(LIBFLAGS) $@ $(LIB$(TNR)FILES) $(LIB$(TNR)OBJFILES)
99 @+-$(RM) $(@:s/.lib/.lin/)
100 .IF "$(LIB$(TNR)OBJFILES)"!=""
101 @+$(TYPE) $(mktmp $(LIB$(TNR)OBJFILES)) > $(null,$(LIB$(TNR)OBJFILES) $(NULLDEV) $(@:s/.lib/.lin/))
102 .ENDIF # "$(LIB$(TNR)OBJFILES)"!=""
103 .IF "$(LIB$(TNR)FILES)"!=""
104 @-$(TYPE) $(foreach,i,$(LIB$(TNR)FILES) $(i:s/.lib/.lin/)) >> $(@:s/.lib/.lin/)
105 .ENDIF # "$(LIB$(TNR)FILES)"!=""
106 @+$(ECHONL)
108 .ELSE # "$(GUI)"=="UNX"
109 .IF "$(GUI)"=="WNT"
110 .IF "$(COM)"=="GCC"
111 +$(ECHONL) $(LIB$(TNR)OBJFILES) | sed "s#$(PRJ:s/././)/$(ROUT)#$(ROUT)#g" | xargs -n1 > $@
112 @+cat /dev/null $(LIB$(TNR)FILES) | xargs -n1 >> $@
113 .ELSE
114 $(COMMAND_ECHO)$(LIBMGR) $(LIBFLAGS) /OUT:$@ @$(mktmp $(LIB$(TNR)FILES) $(LIB$(TNR)OBJFILES))
115 @-$(RM) $(@:s/.lib/.lin/)
116 .IF "$(LIB$(TNR)OBJFILES)"!=""
117 @$(TYPE) $(mktmp $(LIB$(TNR)OBJFILES)) > $(null,$(LIB$(TNR)OBJFILES) $(NULLDEV) $(@:s/.lib/.lin/))
118 .ENDIF # "$(LIB$(TNR)OBJFILES)"!=""
119 .IF "$(LIB$(TNR)FILES)"!=""
120 @-$(TYPE) $(foreach,i,$(LIB$(TNR)FILES) $(i:s/.lib/.lin/)) >> $(@:s/.lib/.lin/)
121 .ENDIF # "$(LIB$(TNR)FILES)"!=""
122 @$(ECHONL)
123 .ENDIF # "$(LIB$(TNR)FILES)"!=""
124 .ELSE # "$(GUI)"=="WNT"
125 @-$(RM) $@
126 .IF "$(VERBOSE)" == "TRUE"
127 @echo $(LIBMGR) r $@ $(LIB$(TNR)OBJFILES)
128 .ENDIF
129 $(COMMAND_ECHO)$(LIBMGR) r $@ $(LIB$(TNR)OBJFILES) $(LIB$(TNR)FILES) bla.lib
130 .ENDIF # "$(GUI)"=="WNT"
131 .ENDIF # "$(GUI)"=="UNX"
132 .ENDIF # "$(LIB$(TNR)TARGET)" != ""
134 # Anweisungen fuer das LIBTARGETs
135 # unroll end
136 #######################################################