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

 1 martin 1.13 #//%2005////////////////////////////////////////////////////////////////////////
 2             #//
 3             #// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
 4             #// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
 5             #// Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
 6             #// IBM Corp.; EMC Corporation, The Open Group.
 7             #// Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
 8             #// IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
 9             #// Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
10             #// EMC Corporation; VERITAS Software Corporation; The Open Group.
11             #//
12             #// Permission is hereby granted, free of charge, to any person obtaining a copy
13             #// of this software and associated documentation files (the "Software"), to
14             #// deal in the Software without restriction, including without limitation the
15             #// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
16             #// sell copies of the Software, and to permit persons to whom the Software is
17             #// furnished to do so, subject to the following conditions:
18             #// 
19             #// THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
20             #// ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
21             #// "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
22 martin 1.13 #// LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
23             #// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24             #// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
25             #// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26             #// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27             #//
28             #//==============================================================================
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                    ## 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                    GCC_VERSION=$(word 3, $(shell $(CXX) --version))
41                    ifneq ($(GCC_VERSION), 2.9.5)
42                        _NO_TMP_O=yes
43 dan           1.7  endif
44 david.dillard 1.11 else
45                        _NO_TMP_O=yes
46 dan           1.7  endif
47                    
48 david.dillard 1.11 _TMP_O = $(PEGASUS_PLATFORM).o
49 keith.petley  1.9  
50 mike          1.1  
51 dan           1.7  ifeq ($(_NO_TMP_O), yes)
52 kumpf         1.6  $(OBJ_DIR)/%.o: %.cpp $(ERROR)
53 w.otsuka      1.12 	$(CXX) -c -o $@ $(FLAGS) $(EXTRA_CXX_FLAGS) $(LOCAL_DEFINES) $(DEFINES) $(SYS_INCLUDES) $(INCLUDES) $*.cpp
54 kumpf         1.6  	@ $(TOUCH) $@
55                    	@ $(ECHO)
56                    else
57 mike          1.1  $(OBJ_DIR)/%.o: %.cpp $(ERROR)
58 w.otsuka      1.12 	$(CXX) -c -o $(_TMP_O) $(FLAGS) $(EXTRA_CXX_FLAGS) $(LOCAL_DEFINES) $(DEFINES) $(SYS_INCLUDES) $(INCLUDES) $*.cpp
59 mike          1.5  	@ $(COPY) $(_TMP_O) $@
60                    	@ $(RM) $(_TMP_O)
61                    	@ $(TOUCH) $@
62 mike          1.1  	@ $(ECHO)
63 kumpf         1.6  endif
64 schuur        1.10 
65                    ifeq ($(_NO_TMP_O), yes)
66                    $(OBJ_DIR)/%.o: %.c $(ERROR)
67 w.otsuka      1.12 	$(CC) -c -o $@ $(FLAGS) $(EXTRA_C_FLAGS) $(LOCAL_DEFINES) $(DEFINES) $(SYS_INCLUDES) $(INCLUDES) $*.c
68 schuur        1.10 	@ $(TOUCH) $@
69                    	@ $(ECHO)
70                    else
71                    $(OBJ_DIR)/%.o: %.c $(ERROR)
72 w.otsuka      1.12 	$(CC) -c -o $(_TMP_O) $(FLAGS) $(EXTRA_C_FLAGS) $(LOCAL_DEFINES) $(DEFINES) $(SYS_INCLUDES) $(INCLUDES) $*.c
73 schuur        1.10 	@ $(COPY) $(_TMP_O) $@
74                    	@ $(RM) $(_TMP_O)
75                    	@ $(TOUCH) $@
76                    	@ $(ECHO)
77                    endif
78 kumpf         1.14 
79                    ifeq ($(_NO_TMP_O), yes)
80                    $(OBJ_DIR)/%.o: %.s $(ERROR)
81                    	$(CC) -c -o $@ $(FLAGS) $(EXTRA_C_FLAGS) $(LOCAL_DEFINES) $(DEFINES) $(SYS_INCLUDES) $(INCLUDES) $*.s
82                    	@ $(TOUCH) $@
83                    	@ $(ECHO)
84                    else
85                    $(OBJ_DIR)/%.o: %.s $(ERROR)
86                    	$(CC) -c -o $(_TMP_O) $(FLAGS) $(EXTRA_C_FLAGS) $(LOCAL_DEFINES) $(DEFINES) $(SYS_INCLUDES) $(INCLUDES) $*.s
87                    	@ $(COPY) $(_TMP_O) $@
88                    	@ $(RM) $(_TMP_O)
89                    	@ $(TOUCH) $@
90                    	@ $(ECHO)
91                    endif

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2