Make can not remove *.o file


M

moonhkt

Hi all

Do you know why can not remove *.o file ? tab already before rm.

AIX : 5.3
gcc version 4.2.0

make -f a01_markfile

-rw-rw---- 1 moonhkt adg 422 Mar 10 09:22
a01_markfile
-rwxrw---- 1 moonhkt adg 52665 Mar 10 09:20 a01
-rw-rw---- 1 moonhkt adg 647 Mar 10 09:20 a01.o
-rw-rw---- 1 moonhkt adg 122 Mar 09 17:29 a01.c

gcc -v
Using built-in specs.
Target: powerpc-ibm-aix5.3.0.0
Configured with: ../configure --with-as=/usr/bin/as --with-ld=/usr/bin/
ld --enable-languages=c,c++,java --pref
ix=/opt/freeware --enable-threads --enable-version-specific-runtime-
libs --host=powerpc-ibm-aix5.3.0.0 --targe
t=powerpc-ibm-aix5.3.0.0 --build=powerpc-ibm-aix5.3.0.0 --disable-
libjava-multilib
Thread model: aix
gcc version 4.2.0


cat a01_markfile

# http://cslibrary.stanford.edu/107/UnixProgrammingTools.pdf
# 2010/03/10
CC = gcc
PROG = a01
SRCS = a01.c

## This incantation says that the object files
## have the same name as the .c files, but with .o
OBJS = $(SRCS:.c=.o)

## This is the first rule (the default)
## Build the program from the .o's
$(PROG) : $(OBJS)
$(CC) $(OBJS) -o $(PROG)

## Remove all the compilation and debugging files
clean :
rm -f $(OBJS)
 
Ad

Advertisements

K

Keith Thompson

moonhkt said:
Do you know why can not remove *.o file ? tab already before rm.
[snip]

Your question is about the "make" tool, not about the C language.

Try comp.unix.programmer.

(BTW, it worked for me, at least once I made sure to use tabs
rather than spaces in the makefile.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top