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

File: [Pegasus] / pegasus / mak / objects-unix.mak (download)
Revision: 1.9.4.1, Mon Mar 15 18:10:54 2004 UTC (20 years, 2 months ago) by schuur
Branch: RELEASE_2_3_2-branch
CVS Tags: RELEASE_2_3_2-testfreeze, RELEASE_2_3_2-releasesnapshot, RELEASE_2_3_2-branch-freeze
Changes since 1.9: +14 -0 lines
BUG#: 1280
BRANCH: RELEASE_2_3_2-branch
TITLE: Pegasus make process does not support plain c language files
DESCRIPTION: library.mak and objects-unix.mak have been updated to
support .c files. This fixes unix/linux platforms only.

################################################################################
##
## An ugly trick is used here to overcome a bug in g++ 2.9.5. G++ failes to
## cleanup object files that are placed in directories other than the
## current one (using the -o option). To overcome this bug, we use -o.tmp.o 
## and then move the file to the object directory.
##
################################################################################

ifeq ($(OS),HPUX)
  _NO_TMP_O = yes
endif

ifeq ($(PEGASUS_PLATFORM),AIX_RS_IBMCXX)
  _NO_TMP_O = yes
endif

ifeq ($(PEGASUS_PLATFORM),SOLARIS_SPARC_CC)
  _NO_TMP_O = yes
endif

_TMP_O = $(PEGASUS_PLATFORM).o

ifeq ($(_NO_TMP_O), yes)
$(OBJ_DIR)/%.o: %.cpp $(ERROR)
	$(CXX) -c -o $@ $(FLAGS) $(LOCAL_DEFINES) $(DEFINES) $(SYS_INCLUDES) $(INCLUDES) $*.cpp
	@ $(TOUCH) $@
	@ $(ECHO)
else
$(OBJ_DIR)/%.o: %.cpp $(ERROR)
	$(CXX) -c -o $(_TMP_O) $(FLAGS) $(LOCAL_DEFINES) $(DEFINES) $(SYS_INCLUDES) $(INCLUDES) $*.cpp
	@ $(COPY) $(_TMP_O) $@
	@ $(RM) $(_TMP_O)
	@ $(TOUCH) $@
	@ $(ECHO)
endif

ifeq ($(_NO_TMP_O), yes)
$(OBJ_DIR)/%.o: %.c $(ERROR)
	$(CC) -c -o $@ $(FLAGS) $(LOCAL_DEFINES) $(DEFINES) $(SYS_INCLUDES) $(INCLUDES) $*.c
	@ $(TOUCH) $@
	@ $(ECHO)
else
$(OBJ_DIR)/%.o: %.c $(ERROR)
	$(CC) -c -o $(_TMP_O) $(FLAGS) $(LOCAL_DEFINES) $(DEFINES) $(SYS_INCLUDES) $(INCLUDES) $*.c
	@ $(COPY) $(_TMP_O) $@
	@ $(RM) $(_TMP_O)
	@ $(TOUCH) $@
	@ $(ECHO)
endif

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2