xref: /aoo41x/main/solenv/inc/tg_lib.mk (revision cdf0e10c)
1#*************************************************************************
2#
3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4#
5# Copyright 2000, 2010 Oracle and/or its affiliates.
6#
7# OpenOffice.org - a multi-platform office productivity suite
8#
9# This file is part of OpenOffice.org.
10#
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.
14#
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).
20#
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.
25#
26#*************************************************************************
27
28#######################################################
29# Anweisungen fuer das Linken
30# unroll begin
31
32.IF "$(LIB$(TNR)TARGET)" != ""
33.IF "$(LIB$(TNR)ARCHIV)" != ""
34
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.IF "$(OS)" =="HPUX_FRAG_HR"
41	@-$(RM) $(MISC)/$(LIB$(TNR)ARCHIV:b)_closetempl.cmd
42	@echo $(LINK) +inst_close -c `cat $(LIB$(TNR)TARGET) | sed s\#'^'$(ROUT)\#$(PRJ)/$(ROUT)\#g` > $(MISC)/$(LIB$(TNR)ARCHIV:b)_closetempl.cmd
43	@cat $(MISC)/$(LIB$(TNR)ARCHIV:b)_closetempl.cmd
44	@+source $(MISC)/$(LIB$(TNR)ARCHIV:b)_closetempl.cmd
45.ENDIF
46	@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
47.IF "$(OS)$(COM)"=="NETBSDGCC"
48	@echo  ranlib $(LIB$(TNR)ARCHIV) >> $(MISC)/$(LIB$(TNR)ARCHIV:b).cmd
49.ENDIF
50.IF "$(OS)" == "MACOSX"
51	@echo  ranlib $(LIB$(TNR)ARCHIV) >> $(MISC)/$(LIB$(TNR)ARCHIV:b).cmd
52.ENDIF
53.IF "$(VERBOSE)" == "TRUE"
54	@cat $(MISC)/$(LIB$(TNR)ARCHIV:b).cmd
55.ENDIF
56	@+source $(MISC)/$(LIB$(TNR)ARCHIV:b).cmd
57.ELSE			# "$(GUI)"=="UNX"
58.IF "$(GUI)$(COM)"=="WNTGCC"
59	@+-$(RM) $(MISC)/$(LIB$(TNR)ARCHIV:b).cmd
60	@+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
61	@+echo  ranlib $(LIB$(TNR)ARCHIV) >> $(MISC)/$(LIB$(TNR)ARCHIV:b).cmd
62.IF "$(VERBOSE)" == "TRUE"
63	@cat $(MISC)/$(LIB$(TNR)ARCHIV:b).cmd
64.ENDIF
65	@+source $(MISC)/$(LIB$(TNR)ARCHIV:b).cmd
66.ELSE
67	@echo just a dummy > $@
68.ENDIF			# "$(GUI)$(COM)"=="WNTGCC"
69.ENDIF			# "$(GUI)"=="UNX"
70
71.ENDIF			# "$(LIB$(TNR)ARCHIV)" != ""
72
73$(LIB$(TNR)TARGET) :	$(LIB$(TNR)FILES) \
74						$(LIB$(TNR)OBJFILES) \
75						$(LIB$(TNR)DEPN)
76.IF "$(VERBOSE)" == "TRUE"
77	@echo ------------------------------
78	@echo using: $(LIB$(TNR)FILES)
79	@echo using: $(LIB$(TNR)TARGET)
80	@echo ------------------------------
81.ENDIF
82	@echo "Making:   " $(@:f)
83	@@-$(RM) $@
84.IF "$(GUI)"=="UNX"
85	@echo $(LIB$(TNR)OBJFILES:s/.obj/.o/) | sed "s#$(PRJ:s/./\./)/$(ROUT)#$(ROUT)#g" | xargs -n 1 > $@
86	@cat /dev/null $(LIB$(TNR)FILES:s/.obj/.o/) | xargs -n 1 >> $@
87	@$(RM) $(@:d)$(@:b).dump
88.IF "$(OS)"=="MACOSX"
89	@-nm `cat $(LIB$(TNR)TARGET) | sed s\#'^'$(ROUT)\#$(PRJ)/$(ROUT)\#g` > $(@:d)$(@:b).dump
90.ELSE
91	@nm `cat $(LIB$(TNR)TARGET) | sed s\#'^'$(ROUT)\#$(PRJ)/$(ROUT)\#g` > $(@:d)$(@:b).dump
92.ENDIF
93
94.ELIF "$(GUI)"=="OS2"
95	$(COMMAND_ECHO)$(LIBMGR) $(LIBFLAGS) $@ $(LIB$(TNR)FILES) $(LIB$(TNR)OBJFILES)
96	@+-$(RM) $(@:s/.lib/.lin/)
97.IF "$(LIB$(TNR)OBJFILES)"!=""
98	@+$(TYPE) $(mktmp $(LIB$(TNR)OBJFILES)) > $(null,$(LIB$(TNR)OBJFILES) $(NULLDEV) $(@:s/.lib/.lin/))
99.ENDIF          # "$(LIB$(TNR)OBJFILES)"!=""
100.IF "$(LIB$(TNR)FILES)"!=""
101	@-$(TYPE) $(foreach,i,$(LIB$(TNR)FILES) $(i:s/.lib/.lin/)) >> $(@:s/.lib/.lin/)
102.ENDIF          # "$(LIB$(TNR)FILES)"!=""
103	@+$(ECHONL)
104
105.ELSE			# "$(GUI)"=="UNX"
106.IF "$(GUI)"=="WNT"
107.IF "$(COM)"=="GCC"
108	+$(ECHONL) $(LIB$(TNR)OBJFILES) | sed "s#$(PRJ:s/././)/$(ROUT)#$(ROUT)#g" | xargs -n1 > $@
109	@+cat /dev/null $(LIB$(TNR)FILES) | xargs -n1 >> $@
110.ELSE
111	$(COMMAND_ECHO)$(LIBMGR) $(LIBFLAGS) /OUT:$@ @$(mktmp $(LIB$(TNR)FILES) $(LIB$(TNR)OBJFILES))
112    @-$(RM) $(@:s/.lib/.lin/)
113.IF "$(LIB$(TNR)OBJFILES)"!=""
114	@$(TYPE) $(mktmp $(LIB$(TNR)OBJFILES)) > $(null,$(LIB$(TNR)OBJFILES) $(NULLDEV) $(@:s/.lib/.lin/))
115.ENDIF          # "$(LIB$(TNR)OBJFILES)"!=""
116.IF "$(LIB$(TNR)FILES)"!=""
117	@-$(TYPE) $(foreach,i,$(LIB$(TNR)FILES) $(i:s/.lib/.lin/)) >> $(@:s/.lib/.lin/)
118.ENDIF          # "$(LIB$(TNR)FILES)"!=""
119	@$(ECHONL)
120.ENDIF          # "$(LIB$(TNR)FILES)"!=""
121.ELSE			# "$(GUI)"=="WNT"
122	@-$(RM) $@
123  .IF "$(VERBOSE)" == "TRUE"
124	@echo $(LIBMGR) r $@ $(LIB$(TNR)OBJFILES)
125  .ENDIF
126	$(COMMAND_ECHO)$(LIBMGR) r $@ $(LIB$(TNR)OBJFILES) $(LIB$(TNR)FILES) bla.lib
127.ENDIF          # "$(GUI)"=="WNT"
128.ENDIF          # "$(GUI)"=="UNX"
129.ENDIF          # "$(LIB$(TNR)TARGET)" != ""
130
131# Anweisungen fuer das LIBTARGETs
132# unroll end
133#######################################################
134
135