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

 1 mike  1.1 ################################################################################
 2           ##
 3           ## An ugly trick is used here to overcome a bug in g++ 2.9.5. G++ failes to
 4           ## cleanup object files that are placed in directories other than the
 5           ## current one (using the -o option). To overcome this bug, we use -o.tmp.o 
 6           ## and then move the file to the object directory.
 7           ##
 8           ################################################################################
 9           
10 kumpf 1.8 ifeq ($(OS),HPUX)
11 dan   1.7   _NO_TMP_O = yes
12           endif
13           
14           ifeq ($(PEGASUS_PLATFORM),AIX_RS_IBMCXX)
15             _NO_TMP_O = yes
16           endif
17           
18 keith.petley 1.9 ifeq ($(PEGASUS_PLATFORM),SOLARIS_SPARC_CC)
19                    _NO_TMP_O = yes
20                  endif
21                  
22 mike         1.2 _TMP_O = $(PEGASUS_PLATFORM).o
23 mike         1.1 
24 dan          1.7 ifeq ($(_NO_TMP_O), yes)
25 kumpf        1.6 $(OBJ_DIR)/%.o: %.cpp $(ERROR)
26                  	$(CXX) -c -o $@ $(FLAGS) $(LOCAL_DEFINES) $(DEFINES) $(SYS_INCLUDES) $(INCLUDES) $*.cpp
27                  	@ $(TOUCH) $@
28                  	@ $(ECHO)
29                  else
30 mike         1.1 $(OBJ_DIR)/%.o: %.cpp $(ERROR)
31 mike         1.3 	$(CXX) -c -o $(_TMP_O) $(FLAGS) $(LOCAL_DEFINES) $(DEFINES) $(SYS_INCLUDES) $(INCLUDES) $*.cpp
32 mike         1.5 	@ $(COPY) $(_TMP_O) $@
33                  	@ $(RM) $(_TMP_O)
34                  	@ $(TOUCH) $@
35 mike         1.1 	@ $(ECHO)
36 kumpf        1.6 endif
37 schuur       1.9.4.1 
38                      ifeq ($(_NO_TMP_O), yes)
39                      $(OBJ_DIR)/%.o: %.c $(ERROR)
40                      	$(CC) -c -o $@ $(FLAGS) $(LOCAL_DEFINES) $(DEFINES) $(SYS_INCLUDES) $(INCLUDES) $*.c
41                      	@ $(TOUCH) $@
42                      	@ $(ECHO)
43                      else
44                      $(OBJ_DIR)/%.o: %.c $(ERROR)
45                      	$(CC) -c -o $(_TMP_O) $(FLAGS) $(LOCAL_DEFINES) $(DEFINES) $(SYS_INCLUDES) $(INCLUDES) $*.c
46                      	@ $(COPY) $(_TMP_O) $@
47                      	@ $(RM) $(_TMP_O)
48                      	@ $(TOUCH) $@
49                      	@ $(ECHO)
50                      endif

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2