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_obj.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 #*************************************************************************
34 .IF
"$(OBJTARGET)"!=""
35 $(OBJTARGET
): $(OBJFILES
) $(IDLOBJFILES
)
36 .IF
"$(VERBOSE)" == "TRUE"
37 @echo
------------------------------
39 @echo
"Making: " $(@
:f
)
41 .IF
"$(LIBTARGET)"!="NO"
42 @
-$(TYPE
) $(mktmp
$(&:+"\n")) > $(@
:s
/.lib
/.lin
/)
43 .ENDIF
# "$(LIBTARGET)"!="NO"
44 $(COMMAND_ECHO
)$(LIBMGR
) $(LIBFLAGS
) $@
$(&)
45 .ENDIF
# "$(GUI)"=="OS2"
49 $(ECHONL
) $(foreach,i
,$(OBJFILES
:f
) $(ROBJ
)/$(i
)) > $@
50 .ELSE
# "$(COM)"=="GCC"
51 .IF
"$(LIBTARGET)"!="NO"
52 @
-$(TYPE
) $(mktmp
$(&:+"\n")) > $(@
:s
/.lib
/.lin
/)
53 .ENDIF
# "$(LIBTARGET)"!="NO"
54 $(COMMAND_ECHO
)$(LIBMGR
) $(LIBFLAGS
) /OUT
:$@ @
$(mktmp
$(&:+"\n"))
55 .ENDIF
# "$(COM)"=="GCC"
56 .ENDIF
# "$(GUI)"=="WNT"
58 @echo
$(foreach,i
,$(OBJFILES
:f
) $(ROBJ
)/$(i
:s
/.obj
/.o
/)) | xargs
-n1
> $@
60 @
-nm
`cat $(OBJTARGET) | sed s\#'^'$(ROUT)\#$(PRJ)/$(ROUT)\#g` > $(@
:d
)$(@
:b
).dump
62 @nm
`cat $(OBJTARGET) | sed s\#'^'$(ROUT)\#$(PRJ)/$(ROUT)\#g` > $(@
:d
)$(@
:b
).dump
64 .ENDIF
# "$(GUI)"=="UNX"
65 .ENDIF
# "$(OBJTARGET)"!=""
68 .IF
"$(SECOND_BUILD)"!=""
69 .IF
"$($(SECOND_BUILD)OBJTARGET)"!=""
70 $($(SECOND_BUILD
)OBJTARGET
): $(REAL_
$(SECOND_BUILD
)_OBJFILES
)
71 .IF
"$(VERBOSE)" == "TRUE"
72 @echo
------------------------------
74 @echo
"Making: " $(@
:f
)
76 .IF
"$(LIBTARGET)"!="NO"
77 @
-$(TYPE
) $(mktmp
$(&:+"\n")) > $(@
:s
/.lib
/.lin
/)
78 .ENDIF
# "$(LIBTARGET)"!="NO"
79 $(COMMAND_ECHO
)$(LIBMGR
) $(LIBFLAGS
) $@
$(&)
80 .ENDIF
# "$(GUI)"=="OS2"
84 # $(LIBMGR) $(LIBFLAGS) $@ $(OBJFILES)
85 $(ECHONL
) $(foreach,i
,$(REAL_
$(SECOND_BUILD
)_OBJFILES
:f
) $(ROBJ
)/$(i
)) > $@
87 .IF
"$(LIBTARGET)"!="NO"
88 @
-$(TYPE
) $(mktmp
$(&:+"\n")) > $(@
:s
/.lib
/.lin
/)
89 .ENDIF
# "$(LIBTARGET)"!="NO"
90 $(COMMAND_ECHO
)$(LIBMGR
) $(LIBFLAGS
) /OUT
:$@ @
$(mktmp
$(&:+"\n"))
92 .ENDIF
# "$(GUI)"=="WNT"
94 @echo
$(foreach,i
,$(REAL_
$(SECOND_BUILD
)_OBJFILES
:f
) $(ROBJ
)/$(i
:s
/.obj
/.o
/)) | xargs
-n1
>> $@
95 .ENDIF
# "$(GUI)"=="UNX"
96 .ENDIF
# "$($(SECOND_BUILD)OBJTARGET)"!=""
97 .ENDIF
# "$(SECOND_BUILD)"!=""
100 .IF
"$(LIBTARGET)"!="NO"
101 @
-$(TYPE
) $(mktmp
$(&:+"\n")) > $(@
:s
/.lib
/.lin
/)
102 .ENDIF
# "$(LIBTARGET)"!="NO"
103 $(COMMAND_ECHO
)$(LIBMGR
) $(LIBFLAGS
) $@
$(&)
104 .ENDIF
# "$(GUI)"=="OS2"