(file) Return to objects-unix.mak CVS log (file) (dir) Up to [Pegasus] / pegasus / mak

 1 martin 1.18 #//%LICENSE////////////////////////////////////////////////////////////////
 2 martin 1.19 #//
 3 martin 1.18 #// Licensed to The Open Group (TOG) under one or more contributor license
 4             #// agreements.  Refer to the OpenPegasusNOTICE.txt file distributed with
 5             #// this work for additional information regarding copyright ownership.
 6             #// Each contributor licenses this file to you under the OpenPegasus Open
 7             #// Source License; you may not use this file except in compliance with the
 8             #// License.
 9 martin 1.19 #//
10 martin 1.18 #// Permission is hereby granted, free of charge, to any person obtaining a
11             #// copy of this software and associated documentation files (the "Software"),
12             #// to deal in the Software without restriction, including without limitation
13             #// the rights to use, copy, modify, merge, publish, distribute, sublicense,
14             #// and/or sell copies of the Software, and to permit persons to whom the
15             #// Software is furnished to do so, subject to the following conditions:
16 martin 1.19 #//
17 martin 1.18 #// The above copyright notice and this permission notice shall be included
18             #// in all copies or substantial portions of the Software.
19 martin 1.19 #//
20 martin 1.18 #// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21 martin 1.19 #// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 martin 1.18 #// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23             #// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
24             #// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25             #// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26             #// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 martin 1.19 #//
28 martin 1.18 #//////////////////////////////////////////////////////////////////////////
29 mike   1.1  ################################################################################
30             ##
31 david.dillard 1.11 ## An ugly trick is used here to overcome a bug in g++ v2.9.5. G++ fails to
32 mike          1.1  ## cleanup object files that are placed in directories other than the
33 kumpf         1.20 ## current one (using the -o option). To overcome this bug, we use -o.tmp.o
34 david.dillard 1.11 ## and then move the file to the object directory.  Note, this is only done for
35                    ## v2.9.5 of g++.
36 mike          1.1  ##
37                    ################################################################################
38                    
39 david.dillard 1.11 ifeq ($(findstring _GNU, $(PEGASUS_PLATFORM)), _GNU)
40                    ifneq ($(GCC_VERSION), 2.9.5)
41                        _NO_TMP_O=yes
42 dan           1.7  endif
43 david.dillard 1.11 else
44                        _NO_TMP_O=yes
45 dan           1.7  endif
46                    
47 david.dillard 1.11 _TMP_O = $(PEGASUS_PLATFORM).o
48 keith.petley  1.9  
49 mike          1.1  
50 dan           1.7  ifeq ($(_NO_TMP_O), yes)
51 denise.eckstein 1.17 $(OBJ_DIR)/%.o: $(OBJ_DIR)/target %.cpp $(ERROR)
52 w.otsuka        1.12 	$(CXX) -c -o $@ $(FLAGS) $(EXTRA_CXX_FLAGS) $(LOCAL_DEFINES) $(DEFINES) $(SYS_INCLUDES) $(INCLUDES) $*.cpp
53 kumpf           1.6  	@ $(TOUCH) $@
54                      	@ $(ECHO)
55                      else
56 mike            1.1  $(OBJ_DIR)/%.o: %.cpp $(ERROR)
57 w.otsuka        1.12 	$(CXX) -c -o $(_TMP_O) $(FLAGS) $(EXTRA_CXX_FLAGS) $(LOCAL_DEFINES) $(DEFINES) $(SYS_INCLUDES) $(INCLUDES) $*.cpp
58 mike            1.5  	@ $(COPY) $(_TMP_O) $@
59                      	@ $(RM) $(_TMP_O)
60                      	@ $(TOUCH) $@
61 mike            1.1  	@ $(ECHO)
62 kumpf           1.6  endif
63 schuur          1.10 
64                      ifeq ($(_NO_TMP_O), yes)
65 denise.eckstein 1.17 $(OBJ_DIR)/%.o: $(OBJ_DIR)/target %.c $(ERROR)
66 w.otsuka        1.12 	$(CC) -c -o $@ $(FLAGS) $(EXTRA_C_FLAGS) $(LOCAL_DEFINES) $(DEFINES) $(SYS_INCLUDES) $(INCLUDES) $*.c
67 schuur          1.10 	@ $(TOUCH) $@
68                      	@ $(ECHO)
69                      else
70                      $(OBJ_DIR)/%.o: %.c $(ERROR)
71 w.otsuka        1.12 	$(CC) -c -o $(_TMP_O) $(FLAGS) $(EXTRA_C_FLAGS) $(LOCAL_DEFINES) $(DEFINES) $(SYS_INCLUDES) $(INCLUDES) $*.c
72 schuur          1.10 	@ $(COPY) $(_TMP_O) $@
73                      	@ $(RM) $(_TMP_O)
74                      	@ $(TOUCH) $@
75                      	@ $(ECHO)
76                      endif
77 kumpf           1.14 
78                      ifeq ($(_NO_TMP_O), yes)
79 denise.eckstein 1.17 $(OBJ_DIR)/%.o: $(OBJ_DIR)/target %.s $(ERROR)
80 kumpf           1.14 	$(CC) -c -o $@ $(FLAGS) $(EXTRA_C_FLAGS) $(LOCAL_DEFINES) $(DEFINES) $(SYS_INCLUDES) $(INCLUDES) $*.s
81                      	@ $(TOUCH) $@
82                      	@ $(ECHO)
83                      else
84                      $(OBJ_DIR)/%.o: %.s $(ERROR)
85                      	$(CC) -c -o $(_TMP_O) $(FLAGS) $(EXTRA_C_FLAGS) $(LOCAL_DEFINES) $(DEFINES) $(SYS_INCLUDES) $(INCLUDES) $*.s
86                      	@ $(COPY) $(_TMP_O) $@
87                      	@ $(RM) $(_TMP_O)
88                      	@ $(TOUCH) $@
89                      	@ $(ECHO)
90                      endif

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2