[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
make is deleting the c files created during compilation
From: |
J. Grant |
Subject: |
make is deleting the c files created during compilation |
Date: |
Sun, 22 Jun 2003 16:15:13 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312 |
Hello,
I'm experiencing an odd effect using GNU Make version 3.79.1.
When the file created during the execution of the makefile is deleted
based on this line "$(BMP2C) $< $(*F) > $@" in the Makefile below.
Does make have a rule that "deletes all files cat into automated
filenames" on exit or something? I am not calling "rm cd.c" at any
point in the Makefile.
Is this the desired effect? Is this a bug?
Please cc me in any replies.
Cheers
JG
The following shows the execution:
$ make -f Makefile.mak
/usr/bin/wine.bin d:\\bin\\bmp2c resources/cd.bmp cd > cd.c
#ee-gcc -c cd.c -o obj/cd.o
#ee-gcc -Tlinkfile -o balls.elf obj/cd.o
rm cd.c
$
The Makefile is as follows:
CC=ee-gcc
AS=ee-as
LD=ee-elf-ld
BMP2C=/usr/bin/wine.bin d:\\bin\\bmp2c
DEMO = balls
OBJ_DIR = obj
BMP_DIR = resources
BMP_SRC = cd.c
C_SRC = $(BMP_SRC)
C_OBJ = $(addprefix $(OBJ_DIR)/, $(C_SRC:.c=.o))
$(DEMO).elf: $(C_OBJ)
#$(CC) $(CFLAGS) -Tlinkfile -o $(DEMO).elf $(C_OBJ) $(S_OBJ) $(LDFLAGS)
$(OBJ_DIR)/%.o: %.c
#$(CC) -c $(CFLAGS) $< -o $@
%.c: $(BMP_DIR)/%.bmp
$(BMP2C) $< $(*F) > $@
.PHONY: clean
clean:
rm -f $(C_OBJ) *.elf
- make is deleting the c files created during compilation,
J. Grant <=