dmake error
hi,
.I m using sun studio compiler 11.i tried to build makefile.but i got the following error.plz help me to resolve it.
dmake -m serial -f "/root/.sunstudio/11-Linux-i686/sampledir/namrata/STACK/Makefile"
dmake: Warning: Infinite loop: Target `cEmptyFile.c' depends on itself
cc -g -xCC -c -I/root/.sunstudio/11-Linux-i686/sampledir/namrata/STACK -o cEmptyFile.o cEmptyFile.c
cc: language CC not recognized
cc: language CC not recognized
cc: cEmptyFile.c: linker input file unused because linking not done
cc -g -xCC-I/root/.sunstudio/11-Linux-i686/sampledir/namrata/STACK -o cEmptyFile.c ./cEmptyFile.o
cc: ./cEmptyFile.o: No such file or directory
cc: warning: '-x CC' after last input file has no effect
cc: no input files
*** Error code 1
dmake: Fatal error: Command failed for target `cEmptyFile.c'
Build Failed
[915 byte] By [
namsyn] at [2007-11-26 10:12:49]

# 1
It would be helpful to see your makefile. What catches my eye in make's output is this:
cc -g -xCC -c -I/root/.sunstudio/11-Linux-i686/sampledir/namrata/STACK -o cEmptyFile.o cEmptyFile.c
cc -g -xCC -I/root/.sunstudio/11-Linux-i686/sampledir/namrata/STACK -o cEmptyFile.c ./cEmptyFile.o
First line is okay, but the second one looks strange: compiler output is redirected to a .c file, while input file is .o
Most probably there's an error in a makefile, which [implicitly] leads to recursive dependency. Can't say more without seeing the makefile itself.
# 3
The makefile for this pgm is as follows.But it giving same error gor each program.
## -*- Makefile -*-
##
## User: root
## Time: Sep 19, 2006 4:18:13 PM
## Makefile created by Sun Studio.
##
## This file is generated automatically.
##
#### Compiler and tool definitions shared by all build targets #####
CC = cc
BASICOPTS = -g
CFLAGS = $(BASICOPTS) -xCC
# Define the target directories.
TARGETDIR_cEmptyFile.c=Sun-i386-Linux
all: $(TARGETDIR_cEmptyFile.c)/cEmptyFile.c
## Target: cEmptyFile.c
CPPFLAGS_cEmptyFile.c = \
-I/root/.sunstudio/11-Linux-i686/sampledir/namrata/STACK
OBJS_cEmptyFile.c = \
$(TARGETDIR_cEmptyFile.c)/cEmptyFile.o
USERLIBS_cEmptyFile.c = $(SYSLIBS_cEmptyFile.c)
DEPLIBS_cEmptyFile.c =
LDLIBS_cEmptyFile.c = $(USERLIBS_cEmptyFile.c)
# Link or archive
$(TARGETDIR_cEmptyFile.c)/cEmptyFile.c: $(TARGETDIR_cEmptyFile.c) $(OBJS_cEmptyFile.c) $(DEPLIBS_cEmptyFile.c)
$(LINK.c) $(CFLAGS_cEmptyFile.c) $(CPPFLAGS_cEmptyFile.c) -o $@ $(OBJS_cEmptyFile.c) $(LDLIBS_cEmptyFile.c)
# Compile source files into .o files
$(TARGETDIR_cEmptyFile.c)/cEmptyFile.o: $(TARGETDIR_cEmptyFile.c) cEmptyFile.c
$(COMPILE.c) $(CFLAGS_cEmptyFile.c) $(CPPFLAGS_cEmptyFile.c) -o $@ cEmptyFile.c
#### Clean target deletes all generated files ####
clean:
rm -f \
$(TARGETDIR_cEmptyFile.c)/cEmptyFile.c \
$(TARGETDIR_cEmptyFile.c)/cEmptyFile.o
rm -f -r $(TARGETDIR_cEmptyFile.c)
# Create the target directory (if needed)
$(TARGETDIR_cEmptyFile.c):
mkdir -p $(TARGETDIR_cEmptyFile.c)
# Enable dependency checking
.KEEP_STATE:
.KEEP_STATE_FILE:.make.state.Sun-i386-Linux