(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                    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 kumpf         1.6  $(OBJ_DIR)/%.o: %.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                    $(OBJ_DIR)/%.o: %.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                    $(OBJ_DIR)/%.o: %.s $(ERROR)
80                    	$(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