Version 4.0.0.1, tag libreoffice-4.0.0.1
[LibreOffice.git] / solenv / inc / tg_lib.mk
bloba93d6ad5602c4c47bdf143d20dcc606968756a08
1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # Copyright 2000, 2010 Oracle and/or its affiliates.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # This file is part of OpenOffice.org.
11 # OpenOffice.org is free software: you can redistribute it and/or modify
12 # it under the terms of the GNU Lesser General Public License version 3
13 # only, as published by the Free Software Foundation.
15 # OpenOffice.org is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU Lesser General Public License version 3 for more details
19 # (a copy is included in the LICENSE file that accompanied this code).
21 # You should have received a copy of the GNU Lesser General Public License
22 # version 3 along with OpenOffice.org. If not, see
23 # <http://www.openoffice.org/license.html>
24 # for a copy of the LGPLv3 License.
26 #*************************************************************************
28 #######################################################
29 # Anweisungen fuer das Linken
30 # unroll begin
32 .IF "$(LIB$(TNR)TARGET)" != ""
33 .IF "$(LIB$(TNR)ARCHIV)" != ""
35 $(LIB$(TNR)ARCHIV) : $(LIB$(TNR)TARGET)
36 @echo "Making: " $(@:f)
37 @@-$(RM) $@
38 .IF "$(GUI)"=="UNX"
39 @-$(RM) $(MISC)/$(LIB$(TNR)ARCHIV:b).cmd
40 @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
41 .IF "$(OS)$(COM)"=="NETBSDGCC"
42 @echo ranlib $(LIB$(TNR)ARCHIV) >> $(MISC)/$(LIB$(TNR)ARCHIV:b).cmd
43 .ENDIF
44 .IF "$(OS)" == "MACOSX"
45 @echo ranlib $(LIB$(TNR)ARCHIV) >> $(MISC)/$(LIB$(TNR)ARCHIV:b).cmd
46 .ENDIF
47 .IF "$(VERBOSE)" == "TRUE"
48 @cat $(MISC)/$(LIB$(TNR)ARCHIV:b).cmd
49 .ENDIF
50 @+source $(MISC)/$(LIB$(TNR)ARCHIV:b).cmd
51 .ELSE # "$(GUI)"=="UNX"
52 .IF "$(GUI)$(COM)"=="WNTGCC"
53 @+-$(RM) $(MISC)/$(LIB$(TNR)ARCHIV:b).cmd
54 @+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
55 @+echo $(RANLIB) $(LIB$(TNR)ARCHIV) >> $(MISC)/$(LIB$(TNR)ARCHIV:b).cmd
56 .IF "$(VERBOSE)" == "TRUE"
57 @cat $(MISC)/$(LIB$(TNR)ARCHIV:b).cmd
58 .ENDIF
59 @+source $(MISC)/$(LIB$(TNR)ARCHIV:b).cmd
60 .ELSE
61 @echo just a dummy > $@
62 .ENDIF # "$(GUI)$(COM)"=="WNTGCC"
63 .ENDIF # "$(GUI)"=="UNX"
65 .ENDIF # "$(LIB$(TNR)ARCHIV)" != ""
67 $(LIB$(TNR)TARGET) : $(LIB$(TNR)FILES) \
68 $(LIB$(TNR)OBJFILES) \
69 $(LIB$(TNR)DEPN)
70 .IF "$(VERBOSE)" == "TRUE"
71 @echo ------------------------------
72 @echo using: $(LIB$(TNR)FILES)
73 @echo using: $(LIB$(TNR)TARGET)
74 @echo ------------------------------
75 .ENDIF
76 @echo "Making: " $(@:f)
77 @@-$(RM) $@
78 .IF "$(GUI)"=="UNX"
79 @echo $(LIB$(TNR)OBJFILES:s/.obj/.o/) | sed "s#$(PRJ:s/./\./)/$(ROUT)#$(ROUT)#g" | xargs -n 1 > $@
80 @cat /dev/null $(LIB$(TNR)FILES:s/.obj/.o/) | xargs -n 1 >> $@
81 @$(RM) $(@:d)$(@:b).dump
82 .IF "$(OS)"=="MACOSX"
83 @-nm `cat $(LIB$(TNR)TARGET) | sed s\#'^'$(ROUT)\#$(PRJ)/$(ROUT)\#g` > $(@:d)$(@:b).dump
84 .ELSE
85 @nm `cat $(LIB$(TNR)TARGET) | sed s\#'^'$(ROUT)\#$(PRJ)/$(ROUT)\#g` > $(@:d)$(@:b).dump
86 .ENDIF
88 .ELSE # "$(GUI)"=="UNX"
89 .IF "$(GUI)"=="WNT"
90 .IF "$(COM)"=="GCC"
91 +$(ECHONL) $(LIB$(TNR)OBJFILES) | sed "s#$(PRJ:s/././)/$(ROUT)#$(ROUT)#g" | xargs -n1 > $@
92 @+cat /dev/null $(LIB$(TNR)FILES) | xargs -n1 >> $@
93 .ELSE
94 $(COMMAND_ECHO)$(LIBMGR) $(LIBFLAGS) /OUT:$@ @$(mktmp $(LIB$(TNR)FILES) $(LIB$(TNR)OBJFILES))
95 @-$(RM) $(@:s/.lib/.lin/)
96 .IF "$(LIB$(TNR)OBJFILES)"!=""
97 @$(TYPE) $(mktmp $(LIB$(TNR)OBJFILES)) > $(null,$(LIB$(TNR)OBJFILES) $(NULLDEV) $(@:s/.lib/.lin/))
98 .ENDIF # "$(LIB$(TNR)OBJFILES)"!=""
99 .IF "$(LIB$(TNR)FILES)"!=""
100 @-$(TYPE) $(foreach,i,$(LIB$(TNR)FILES) $(i:s/.lib/.lin/)) >> $(@:s/.lib/.lin/)
101 .ENDIF # "$(LIB$(TNR)FILES)"!=""
102 @$(ECHONL)
103 .ENDIF # "$(LIB$(TNR)FILES)"!=""
104 .ELSE # "$(GUI)"=="WNT"
105 @-$(RM) $@
106 .IF "$(VERBOSE)" == "TRUE"
107 @echo $(LIBMGR) r $@ $(LIB$(TNR)OBJFILES)
108 .ENDIF
109 $(COMMAND_ECHO)$(LIBMGR) r $@ $(LIB$(TNR)OBJFILES) $(LIB$(TNR)FILES) bla.lib
110 .ENDIF # "$(GUI)"=="WNT"
111 .ENDIF # "$(GUI)"=="UNX"
112 .ENDIF # "$(LIB$(TNR)TARGET)" != ""
114 # Anweisungen fuer das LIBTARGETs
115 # unroll end
116 #######################################################