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: tg_lib.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 #*************************************************************************
32 #######################################################
33 # Anweisungen fuer das Linken
36 .IF
"$(LIB$(TNR)TARGET)" != ""
37 .IF
"$(LIB$(TNR)ARCHIV)" != ""
39 $(LIB
$(TNR
)ARCHIV
) : $(LIB
$(TNR
)TARGET
)
40 @echo
"Making: " $(@
:f
)
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
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
54 .IF
"$(OS)" == "MACOSX"
55 @echo ranlib
$(LIB
$(TNR
)ARCHIV
) >> $(MISC
)/$(LIB
$(TNR
)ARCHIV
:b
).cmd
57 .IF
"$(VERBOSE)" == "TRUE"
58 @cat
$(MISC
)/$(LIB
$(TNR
)ARCHIV
:b
).cmd
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
69 @
+source
$(MISC
)/$(LIB
$(TNR
)ARCHIV
:b
).cmd
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
) \
80 .IF
"$(VERBOSE)" == "TRUE"
81 @echo using
: $(LIB
$(TNR
)FILES
)
82 @echo using
: $(LIB
$(TNR
)TARGET
)
83 @echo
------------------------------
85 @echo
"Making: " $(@
:f
)
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
92 @
-nm
`cat $(LIB$(TNR)TARGET) | sed s\#'^'$(ROUT)\#$(PRJ)/$(ROUT)\#g` > $(@
:d
)$(@
:b
).dump
94 @nm
`cat $(LIB$(TNR)TARGET) | sed s\#'^'$(ROUT)\#$(PRJ)/$(ROUT)\#g` > $(@
:d
)$(@
:b
).dump
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)"!=""
108 .ELSE
# "$(GUI)"=="UNX"
111 +$(ECHONL
) $(LIB
$(TNR
)OBJFILES
) | sed
"s#$(PRJ:s/././)/$(ROUT)#$(ROUT)#g" | xargs
-n1
> $@
112 @
+cat
/dev
/null
$(LIB
$(TNR
)FILES
) | xargs
-n1
>> $@
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)"!=""
123 .ENDIF
# "$(LIB$(TNR)FILES)"!=""
124 .ELSE
# "$(GUI)"=="WNT"
126 .IF
"$(VERBOSE)" == "TRUE"
127 @echo
$(LIBMGR
) r
$@
$(LIB
$(TNR
)OBJFILES
)
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
136 #######################################################