This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
gcc problems with HP-UX 10.2
- To: "'gcc at gcc dot gnu dot org'" <gcc at gcc dot gnu dot org>
- Subject: gcc problems with HP-UX 10.2
- From: "Coutu, Alain Capt (CF) NSSF/SCOA" <Alain dot Coutu at 1staf dot tyndall dot af dot mil>
- Date: Wed, 14 Feb 2001 15:12:22 -0600
We are trying to compile an application of over 2500 files using gcc on
HP-UX 10.2. The application was formerly compiled under HP-UX 9.03 using
the HP ANSI C compiler. The application several Makefiles and when I run
the master makefile I get the following error for all the files being
compiled: cc: cannot specify -o with -c or -S and multiple compilations.
However, when I instantiate a specific Makefile from its directory, it
compile fine. As soon as I instantiate the parent Makefile, it return the
error mentioned above. I read through the archive similar problems
encountered using Linux. Can someone help.
An example of a parent Makefile is as follows:
#
# This is a makefile to build the source files of mpl
#
#
SHELL = /bin/csh
QUE = $(SYSSRC)/mdp/src/mpl/queue
QKER = $(SYSSRC)/mdp/src/mpl/que_kernel
SHM = $(SYSSRC)/mdp/src/mpl/shm
LOCK = $(SYSSRC)/mdp/src/mpl/lock
MPS = $(SYSSRC)/mdp/src/mpl/mps
CFP = $(SYSSRC)/mdp/src/mpl/cf_parse
VAL = $(SYSSRC)/mdp/src/mpl/val
ICZ = $(SYSSRC)/mdp/src/mpl/icz_libscs
ERR = $(SYSSRC)/mdp/src/mpl/mpe_error_lib
EXEC = $(SYSSRC)/mdp/src/mpl/mpe_exec_lib
SIM = $(SYSSRC)/mdp/src/mpl/sim_comm
OPTS = $(SYSSRC)/mdp/mdp_options
all: compile
erase:
@echo Cleanup $(QUE); rm -f $(QUE)/*.o; rm -f $(QUE)/core;
@echo Cleanup $(QKER); rm -f $(QKER)/*.o; rm -f $(QKER)/core;
@echo Cleanup $(SHM); rm -f $(SHM)/*.o; rm -f $(SHM)/core;
@echo Cleanup $(LOCK); rm -f $(LOCK)/*.o; rm -f $(LOCK)/core;
@echo Cleanup $(MPS); rm -f $(MPS)/*.o; rm -f $(MPS)/core;
@echo Cleanup $(CFP); rm -f $(CFP)/*.o; rm -f $(CFP)/core;
@echo Cleanup $(VAL); rm -f $(VAL)/*.o; rm -f $(VAL)/core;
@echo Cleanup $(ICZ); rm -f $(ICZ)/*.o; rm -f $(ICZ)/core;
@echo Cleanup $(ERR); rm -f $(ERR)/*.o; rm -f $(ERR)/core;
@echo Cleanup $(EXEC); rm -f $(EXEC)/*.o; rm -f $(EXEC)/core;
@echo Cleanup $(SIM); rm -f $(SIM)/*.o; rm -f $(SIM)/core;
compile:
@source $(OPTS); make -if $(QUE)/Makefile all
@source $(OPTS); make -if $(QKER)/Makefile all
@source $(OPTS); make -if $(SHM)/Makefile all
@source $(OPTS); make -if $(LOCK)/Makefile all
@source $(OPTS); make -if $(MPS)/Makefile all
@source $(OPTS); make -if $(CFP)/Makefile all
@source $(OPTS); make -if $(VAL)/Makefile all
@source $(OPTS); make -if $(ICZ)/Makefile all
@source $(OPTS); make -if $(ERR)/Makefile all
@source $(OPTS); make -if $(EXEC)/Makefile all
@source $(OPTS); make -if $(SIM)/Makefile all
An example of a specific Makefile is as follows for the directory
$(SYSSRC)/mdp/src/mpl/queue of the parent Makefile above :
#
# Define the object files for the queue routines.
#
QUE_DIR = $(SYSSRC)/mdp/src/mpl/queue
QUE_OBJS = $(QUE_DIR)/L81_create_q.o \
$(QUE_DIR)/L82_delete_q.o \
$(QUE_DIR)/L83_delete_all.o \
$(QUE_DIR)/L87_q_status.o \
$(QUE_DIR)/L89a_enqueue.o \
$(QUE_DIR)/L89b_dequeue.o
DPATH = $(SYSMDP)/TOOLS
LPATH = $(SYSSRC)/mdp/lib
LPATH2 = $(SYSSRC)/mdp/lib
QUE_LIB = $(LPATH)/L8_queue_lib.a
IPATH = -I$(SYSSRC)/mdp/inc
DFLAGS = $(MDP_DFLAGS)
CFLAGS = $(MDP_CFLAGS) $(DFLAGS) $(IPATH)
.SUFFIXES: .o .c
.c.o:
@echo Compiling $*.c ...; cc $(CFLAGS) -c $*.c -o $*.o
all: QUELIB
QUELIB: $(QUE_OBJS)
@rm -f $(QUE_LIB)
@echo Building $(QUE_LIB); \
ar r $(QUE_LIB) $(QUE_OBJS);
Alain Coutu