xref: /aoo41x/main/solenv/inc/tg_lib.mk (revision 534c536d)
17871dc3eSAndrew Rist#**************************************************************
27871dc3eSAndrew Rist#
37871dc3eSAndrew Rist#  Licensed to the Apache Software Foundation (ASF) under one
47871dc3eSAndrew Rist#  or more contributor license agreements.  See the NOTICE file
57871dc3eSAndrew Rist#  distributed with this work for additional information
67871dc3eSAndrew Rist#  regarding copyright ownership.  The ASF licenses this file
77871dc3eSAndrew Rist#  to you under the Apache License, Version 2.0 (the
87871dc3eSAndrew Rist#  "License"); you may not use this file except in compliance
97871dc3eSAndrew Rist#  with the License.  You may obtain a copy of the License at
107871dc3eSAndrew Rist#
117871dc3eSAndrew Rist#    http://www.apache.org/licenses/LICENSE-2.0
127871dc3eSAndrew Rist#
137871dc3eSAndrew Rist#  Unless required by applicable law or agreed to in writing,
147871dc3eSAndrew Rist#  software distributed under the License is distributed on an
157871dc3eSAndrew Rist#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
167871dc3eSAndrew Rist#  KIND, either express or implied.  See the License for the
177871dc3eSAndrew Rist#  specific language governing permissions and limitations
187871dc3eSAndrew Rist#  under the License.
197871dc3eSAndrew Rist#
207871dc3eSAndrew Rist#**************************************************************
217871dc3eSAndrew Rist
227871dc3eSAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir#######################################################
25cdf0e10cSrcweir# Anweisungen fuer das Linken
26cdf0e10cSrcweir# unroll begin
27cdf0e10cSrcweir
28cdf0e10cSrcweir.IF "$(LIB$(TNR)TARGET)" != ""
29cdf0e10cSrcweir.IF "$(LIB$(TNR)ARCHIV)" != ""
30cdf0e10cSrcweir
31cdf0e10cSrcweir$(LIB$(TNR)ARCHIV) :	$(LIB$(TNR)TARGET)
32cdf0e10cSrcweir	@echo "Making:   " $(@:f)
33cdf0e10cSrcweir	@@-$(RM) $@
34cdf0e10cSrcweir.IF "$(GUI)"=="UNX"
35cdf0e10cSrcweir	@-$(RM) $(MISC)/$(LIB$(TNR)ARCHIV:b).cmd
36cdf0e10cSrcweir.IF "$(OS)" =="HPUX_FRAG_HR"
37cdf0e10cSrcweir	@-$(RM) $(MISC)/$(LIB$(TNR)ARCHIV:b)_closetempl.cmd
38cdf0e10cSrcweir	@echo $(LINK) +inst_close -c `cat $(LIB$(TNR)TARGET) | sed s\#'^'$(ROUT)\#$(PRJ)/$(ROUT)\#g` > $(MISC)/$(LIB$(TNR)ARCHIV:b)_closetempl.cmd
39cdf0e10cSrcweir	@cat $(MISC)/$(LIB$(TNR)ARCHIV:b)_closetempl.cmd
40cdf0e10cSrcweir	@+source $(MISC)/$(LIB$(TNR)ARCHIV:b)_closetempl.cmd
41cdf0e10cSrcweir.ENDIF
42cdf0e10cSrcweir	@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
43cdf0e10cSrcweir.IF "$(OS)$(COM)"=="NETBSDGCC"
44cdf0e10cSrcweir	@echo  ranlib $(LIB$(TNR)ARCHIV) >> $(MISC)/$(LIB$(TNR)ARCHIV:b).cmd
45cdf0e10cSrcweir.ENDIF
46cdf0e10cSrcweir.IF "$(OS)" == "MACOSX"
47cdf0e10cSrcweir	@echo  ranlib $(LIB$(TNR)ARCHIV) >> $(MISC)/$(LIB$(TNR)ARCHIV:b).cmd
48cdf0e10cSrcweir.ENDIF
49cdf0e10cSrcweir.IF "$(VERBOSE)" == "TRUE"
50cdf0e10cSrcweir	@cat $(MISC)/$(LIB$(TNR)ARCHIV:b).cmd
51cdf0e10cSrcweir.ENDIF
52cdf0e10cSrcweir	@+source $(MISC)/$(LIB$(TNR)ARCHIV:b).cmd
53*534c536dSYuri Dario
54*534c536dSYuri Dario.ELIF "$(GUI)"=="OS2"
55*534c536dSYuri Dario
56*534c536dSYuri Dario	@ln -s $(LIB$(TNR)TARGET) $(LIB$(TNR)ARCHIV)
57*534c536dSYuri Dario
58*534c536dSYuri Dario.ELSE			# "$(GUI)"=="OS2"
59cdf0e10cSrcweir.IF "$(GUI)$(COM)"=="WNTGCC"
60cdf0e10cSrcweir	@+-$(RM) $(MISC)/$(LIB$(TNR)ARCHIV:b).cmd
61cdf0e10cSrcweir	@+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
62cdf0e10cSrcweir	@+echo  ranlib $(LIB$(TNR)ARCHIV) >> $(MISC)/$(LIB$(TNR)ARCHIV:b).cmd
63cdf0e10cSrcweir.IF "$(VERBOSE)" == "TRUE"
64cdf0e10cSrcweir	@cat $(MISC)/$(LIB$(TNR)ARCHIV:b).cmd
65cdf0e10cSrcweir.ENDIF
66cdf0e10cSrcweir	@+source $(MISC)/$(LIB$(TNR)ARCHIV:b).cmd
67cdf0e10cSrcweir.ELSE
68cdf0e10cSrcweir	@echo just a dummy > $@
69cdf0e10cSrcweir.ENDIF			# "$(GUI)$(COM)"=="WNTGCC"
70cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="UNX"
71cdf0e10cSrcweir
72cdf0e10cSrcweir.ENDIF			# "$(LIB$(TNR)ARCHIV)" != ""
73cdf0e10cSrcweir
74cdf0e10cSrcweir$(LIB$(TNR)TARGET) :	$(LIB$(TNR)FILES) \
75cdf0e10cSrcweir						$(LIB$(TNR)OBJFILES) \
76cdf0e10cSrcweir						$(LIB$(TNR)DEPN)
77cdf0e10cSrcweir.IF "$(VERBOSE)" == "TRUE"
78cdf0e10cSrcweir	@echo ------------------------------
79cdf0e10cSrcweir	@echo using: $(LIB$(TNR)FILES)
80cdf0e10cSrcweir	@echo using: $(LIB$(TNR)TARGET)
81cdf0e10cSrcweir	@echo ------------------------------
82cdf0e10cSrcweir.ENDIF
83cdf0e10cSrcweir	@echo "Making:   " $(@:f)
84cdf0e10cSrcweir	@@-$(RM) $@
85cdf0e10cSrcweir.IF "$(GUI)"=="UNX"
86cdf0e10cSrcweir	@echo $(LIB$(TNR)OBJFILES:s/.obj/.o/) | sed "s#$(PRJ:s/./\./)/$(ROUT)#$(ROUT)#g" | xargs -n 1 > $@
87cdf0e10cSrcweir	@cat /dev/null $(LIB$(TNR)FILES:s/.obj/.o/) | xargs -n 1 >> $@
88cdf0e10cSrcweir	@$(RM) $(@:d)$(@:b).dump
89cdf0e10cSrcweir.IF "$(OS)"=="MACOSX"
90cdf0e10cSrcweir	@-nm `cat $(LIB$(TNR)TARGET) | sed s\#'^'$(ROUT)\#$(PRJ)/$(ROUT)\#g` > $(@:d)$(@:b).dump
91cdf0e10cSrcweir.ELSE
92cdf0e10cSrcweir	@nm `cat $(LIB$(TNR)TARGET) | sed s\#'^'$(ROUT)\#$(PRJ)/$(ROUT)\#g` > $(@:d)$(@:b).dump
93cdf0e10cSrcweir.ENDIF
94cdf0e10cSrcweir
95cdf0e10cSrcweir.ELIF "$(GUI)"=="OS2"
96cdf0e10cSrcweir	$(COMMAND_ECHO)$(LIBMGR) $(LIBFLAGS) $@ $(LIB$(TNR)FILES) $(LIB$(TNR)OBJFILES)
97cdf0e10cSrcweir	@+-$(RM) $(@:s/.lib/.lin/)
98cdf0e10cSrcweir.IF "$(LIB$(TNR)OBJFILES)"!=""
99cdf0e10cSrcweir	@+$(TYPE) $(mktmp $(LIB$(TNR)OBJFILES)) > $(null,$(LIB$(TNR)OBJFILES) $(NULLDEV) $(@:s/.lib/.lin/))
100cdf0e10cSrcweir.ENDIF          # "$(LIB$(TNR)OBJFILES)"!=""
101cdf0e10cSrcweir.IF "$(LIB$(TNR)FILES)"!=""
102cdf0e10cSrcweir	@-$(TYPE) $(foreach,i,$(LIB$(TNR)FILES) $(i:s/.lib/.lin/)) >> $(@:s/.lib/.lin/)
103cdf0e10cSrcweir.ENDIF          # "$(LIB$(TNR)FILES)"!=""
104cdf0e10cSrcweir	@+$(ECHONL)
105cdf0e10cSrcweir
106cdf0e10cSrcweir.ELSE			# "$(GUI)"=="UNX"
107cdf0e10cSrcweir.IF "$(GUI)"=="WNT"
108cdf0e10cSrcweir.IF "$(COM)"=="GCC"
109cdf0e10cSrcweir	+$(ECHONL) $(LIB$(TNR)OBJFILES) | sed "s#$(PRJ:s/././)/$(ROUT)#$(ROUT)#g" | xargs -n1 > $@
110cdf0e10cSrcweir	@+cat /dev/null $(LIB$(TNR)FILES) | xargs -n1 >> $@
111cdf0e10cSrcweir.ELSE
112cdf0e10cSrcweir	$(COMMAND_ECHO)$(LIBMGR) $(LIBFLAGS) /OUT:$@ @$(mktmp $(LIB$(TNR)FILES) $(LIB$(TNR)OBJFILES))
113cdf0e10cSrcweir    @-$(RM) $(@:s/.lib/.lin/)
114cdf0e10cSrcweir.IF "$(LIB$(TNR)OBJFILES)"!=""
115cdf0e10cSrcweir	@$(TYPE) $(mktmp $(LIB$(TNR)OBJFILES)) > $(null,$(LIB$(TNR)OBJFILES) $(NULLDEV) $(@:s/.lib/.lin/))
116cdf0e10cSrcweir.ENDIF          # "$(LIB$(TNR)OBJFILES)"!=""
117cdf0e10cSrcweir.IF "$(LIB$(TNR)FILES)"!=""
118cdf0e10cSrcweir	@-$(TYPE) $(foreach,i,$(LIB$(TNR)FILES) $(i:s/.lib/.lin/)) >> $(@:s/.lib/.lin/)
119cdf0e10cSrcweir.ENDIF          # "$(LIB$(TNR)FILES)"!=""
120cdf0e10cSrcweir	@$(ECHONL)
121cdf0e10cSrcweir.ENDIF          # "$(LIB$(TNR)FILES)"!=""
122cdf0e10cSrcweir.ELSE			# "$(GUI)"=="WNT"
123cdf0e10cSrcweir	@-$(RM) $@
124cdf0e10cSrcweir  .IF "$(VERBOSE)" == "TRUE"
125cdf0e10cSrcweir	@echo $(LIBMGR) r $@ $(LIB$(TNR)OBJFILES)
126cdf0e10cSrcweir  .ENDIF
127cdf0e10cSrcweir	$(COMMAND_ECHO)$(LIBMGR) r $@ $(LIB$(TNR)OBJFILES) $(LIB$(TNR)FILES) bla.lib
128cdf0e10cSrcweir.ENDIF          # "$(GUI)"=="WNT"
129cdf0e10cSrcweir.ENDIF          # "$(GUI)"=="UNX"
130cdf0e10cSrcweir.ENDIF          # "$(LIB$(TNR)TARGET)" != ""
131cdf0e10cSrcweir
132cdf0e10cSrcweir# Anweisungen fuer das LIBTARGETs
133cdf0e10cSrcweir# unroll end
134cdf0e10cSrcweir#######################################################
135cdf0e10cSrcweir
136