1 karl 1.16 #//%2006////////////////////////////////////////////////////////////////////////
|
2 martin 1.13 #//
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 karl 1.16 #// Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
12 #// EMC Corporation; Symantec Corporation; The Open Group.
|
13 martin 1.13 #//
14 #// Permission is hereby granted, free of charge, to any person obtaining a copy
15 #// of this software and associated documentation files (the "Software"), to
16 #// deal in the Software without restriction, including without limitation the
17 #// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
18 #// sell copies of the Software, and to permit persons to whom the Software is
19 #// furnished to do so, subject to the following conditions:
20 #//
21 #// THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
22 #// ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
23 #// "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
24 #// LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
25 #// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
26 #// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
27 #// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 #// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 #//
30 #//==============================================================================
|
31 mike 1.1 ################################################################################
32 ##
|
33 david.dillard 1.11 ## An ugly trick is used here to overcome a bug in g++ v2.9.5. G++ fails to
|
34 mike 1.1 ## cleanup object files that are placed in directories other than the
35 ## current one (using the -o option). To overcome this bug, we use -o.tmp.o
|
36 david.dillard 1.11 ## and then move the file to the object directory. Note, this is only done for
37 ## v2.9.5 of g++.
|
38 mike 1.1 ##
39 ################################################################################
40
|
41 david.dillard 1.11 ifeq ($(findstring _GNU, $(PEGASUS_PLATFORM)), _GNU)
42 ifneq ($(GCC_VERSION), 2.9.5)
43 _NO_TMP_O=yes
|
44 dan 1.7 endif
|
45 david.dillard 1.11 else
46 _NO_TMP_O=yes
|
47 dan 1.7 endif
48
|
49 david.dillard 1.11 _TMP_O = $(PEGASUS_PLATFORM).o
|
50 keith.petley 1.9
|
51 mike 1.1
|
52 dan 1.7 ifeq ($(_NO_TMP_O), yes)
|
53 denise.eckstein 1.17 $(OBJ_DIR)/%.o: $(OBJ_DIR)/target %.cpp $(ERROR)
|
54 w.otsuka 1.12 $(CXX) -c -o $@ $(FLAGS) $(EXTRA_CXX_FLAGS) $(LOCAL_DEFINES) $(DEFINES) $(SYS_INCLUDES) $(INCLUDES) $*.cpp
|
55 kumpf 1.6 @ $(TOUCH) $@
56 @ $(ECHO)
57 else
|
58 mike 1.1 $(OBJ_DIR)/%.o: %.cpp $(ERROR)
|
59 w.otsuka 1.12 $(CXX) -c -o $(_TMP_O) $(FLAGS) $(EXTRA_CXX_FLAGS) $(LOCAL_DEFINES) $(DEFINES) $(SYS_INCLUDES) $(INCLUDES) $*.cpp
|
60 mike 1.5 @ $(COPY) $(_TMP_O) $@
61 @ $(RM) $(_TMP_O)
62 @ $(TOUCH) $@
|
63 mike 1.1 @ $(ECHO)
|
64 kumpf 1.6 endif
|
65 schuur 1.10
66 ifeq ($(_NO_TMP_O), yes)
|
67 denise.eckstein 1.17 $(OBJ_DIR)/%.o: $(OBJ_DIR)/target %.c $(ERROR)
|
68 w.otsuka 1.12 $(CC) -c -o $@ $(FLAGS) $(EXTRA_C_FLAGS) $(LOCAL_DEFINES) $(DEFINES) $(SYS_INCLUDES) $(INCLUDES) $*.c
|
69 schuur 1.10 @ $(TOUCH) $@
70 @ $(ECHO)
71 else
72 $(OBJ_DIR)/%.o: %.c $(ERROR)
|
73 w.otsuka 1.12 $(CC) -c -o $(_TMP_O) $(FLAGS) $(EXTRA_C_FLAGS) $(LOCAL_DEFINES) $(DEFINES) $(SYS_INCLUDES) $(INCLUDES) $*.c
|
74 schuur 1.10 @ $(COPY) $(_TMP_O) $@
75 @ $(RM) $(_TMP_O)
76 @ $(TOUCH) $@
77 @ $(ECHO)
78 endif
|
79 kumpf 1.14
80 ifeq ($(_NO_TMP_O), yes)
|
81 denise.eckstein 1.17 $(OBJ_DIR)/%.o: $(OBJ_DIR)/target %.s $(ERROR)
|
82 kumpf 1.14 $(CC) -c -o $@ $(FLAGS) $(EXTRA_C_FLAGS) $(LOCAL_DEFINES) $(DEFINES) $(SYS_INCLUDES) $(INCLUDES) $*.s
83 @ $(TOUCH) $@
84 @ $(ECHO)
85 else
86 $(OBJ_DIR)/%.o: %.s $(ERROR)
87 $(CC) -c -o $(_TMP_O) $(FLAGS) $(EXTRA_C_FLAGS) $(LOCAL_DEFINES) $(DEFINES) $(SYS_INCLUDES) $(INCLUDES) $*.s
88 @ $(COPY) $(_TMP_O) $@
89 @ $(RM) $(_TMP_O)
90 @ $(TOUCH) $@
91 @ $(ECHO)
92 endif
|