xref: /aoo4110/main/solenv/inc/tg_obj.mk (revision b1cdbd2c)
1#**************************************************************
2#
3#  Licensed to the Apache Software Foundation (ASF) under one
4#  or more contributor license agreements.  See the NOTICE file
5#  distributed with this work for additional information
6#  regarding copyright ownership.  The ASF licenses this file
7#  to you under the Apache License, Version 2.0 (the
8#  "License"); you may not use this file except in compliance
9#  with the License.  You may obtain a copy of the License at
10#
11#    http://www.apache.org/licenses/LICENSE-2.0
12#
13#  Unless required by applicable law or agreed to in writing,
14#  software distributed under the License is distributed on an
15#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16#  KIND, either express or implied.  See the License for the
17#  specific language governing permissions and limitations
18#  under the License.
19#
20#**************************************************************
21
22
23
24MKFILENAME:=TG_OBJ.MK
25
26.IF "$(OBJTARGET)"!=""
27$(OBJTARGET): $(OBJFILES) $(IDLOBJFILES)
28	@echo "Making:   " $(@:f)
29.IF "$(GUI)"=="OS2"
30.IF "$(LIBTARGET)"!="NO"
31	@-$(TYPE) $(mktmp $(&:+"\n")) > $(@:s/.lib/.lin/)
32.ENDIF          # "$(LIBTARGET)"!="NO"
33	$(COMMAND_ECHO)$(LIBMGR) $(LIBFLAGS) $@ $(&)
34.ENDIF		# "$(GUI)"=="OS2"
35
36.IF "$(GUI)"=="WNT"
37.IF "$(COM)"=="GCC"
38	$(ECHONL) $(foreach,i,$(OBJFILES:f) $(ROBJ)/$(i)) > $@
39.ELSE			# "$(COM)"=="GCC"
40.IF "$(LIBTARGET)"!="NO"
41	@-$(TYPE) $(mktmp $(&:+"\n")) > $(@:s/.lib/.lin/)
42.ENDIF          # "$(LIBTARGET)"!="NO"
43	$(COMMAND_ECHO)$(LIBMGR) $(LIBFLAGS) /OUT:$@ @$(mktmp $(&:+"\n"))
44.ENDIF			# "$(COM)"=="GCC"
45.ENDIF			# "$(GUI)"=="WNT"
46.IF "$(GUI)"=="UNX"
47	@echo $(foreach,i,$(OBJFILES:f) $(ROBJ)/$(i:s/.obj/.o/)) | xargs -n1 > $@
48.IF "$(OS)"=="MACOSX"
49	@-nm `cat $(OBJTARGET) | sed s\#'^'$(ROUT)\#$(PRJ)/$(ROUT)\#g` > $(@:d)$(@:b).dump
50.ELSE
51	@nm `cat $(OBJTARGET) | sed s\#'^'$(ROUT)\#$(PRJ)/$(ROUT)\#g` > $(@:d)$(@:b).dump
52.ENDIF
53.ENDIF			# "$(GUI)"=="UNX"
54.ENDIF			# "$(OBJTARGET)"!=""
55
56
57.IF "$(SECOND_BUILD)"!=""
58.IF "$($(SECOND_BUILD)OBJTARGET)"!=""
59$($(SECOND_BUILD)OBJTARGET): $(REAL_$(SECOND_BUILD)_OBJFILES)
60	@echo "Making:   " $(@:f)
61.IF "$(GUI)"=="OS2"
62.IF "$(LIBTARGET)"!="NO"
63	@-$(TYPE) $(mktmp $(&:+"\n")) > $(@:s/.lib/.lin/)
64.ENDIF          # "$(LIBTARGET)"!="NO"
65	$(COMMAND_ECHO)$(LIBMGR) $(LIBFLAGS) $@ $(&)
66.ENDIF			# "$(GUI)"=="OS2"
67
68.IF "$(GUI)"=="WNT"
69.IF "$(COM)"=="GCC"
70#     $(LIBMGR) $(LIBFLAGS) $@ $(OBJFILES)
71	$(ECHONL) $(foreach,i,$(REAL_$(SECOND_BUILD)_OBJFILES:f) $(ROBJ)/$(i)) > $@
72.ELSE
73.IF "$(LIBTARGET)"!="NO"
74	@-$(TYPE) $(mktmp $(&:+"\n")) > $(@:s/.lib/.lin/)
75.ENDIF          # "$(LIBTARGET)"!="NO"
76	$(COMMAND_ECHO)$(LIBMGR) $(LIBFLAGS) /OUT:$@ @$(mktmp $(&:+"\n"))
77.ENDIF
78.ENDIF			# "$(GUI)"=="WNT"
79.IF "$(GUI)"=="UNX"
80	@echo $(foreach,i,$(REAL_$(SECOND_BUILD)_OBJFILES:f) $(ROBJ)/$(i:s/.obj/.o/)) | xargs -n1 >> $@
81.ENDIF			# "$(GUI)"=="UNX"
82.ENDIF			# "$($(SECOND_BUILD)OBJTARGET)"!=""
83.ENDIF			# "$(SECOND_BUILD)"!=""
84
85.IF "$(GUI)"=="OS2"
86.IF "$(LIBTARGET)"!="NO"
87	@-$(TYPE) $(mktmp $(&:+"\n")) > $(@:s/.lib/.lin/)
88.ENDIF          # "$(LIBTARGET)"!="NO"
89	$(COMMAND_ECHO)$(LIBMGR) $(LIBFLAGS) $@ $(&)
90.ENDIF			# "$(GUI)"=="OS2"
91