GP32 Makefile Help


pea

developer
Joined
Oct 3, 2004
Messages
1,089
Age
46
Location
New Zealand
Website
www.projectitis.com
Hi all,

Where is CFLAGS actually used in this makefile? I checked all my makefiles and realised that the CFLAGS variable is not actually used anywhere. Does make look for this variable and use it internally?

example from Mr.Mirko SDK
Code:
CC = arm-elf-gcc
LD = arm-elf-gcc
AS = arm-elf-as
AR = arm-elf-ar


INCLUDES = -I../../lib.src/include

CFLAGS = $(INCLUDES) -O2 -s -mtune=arm9tdmi
 
OBJS =  gp_chatboard.o

all:	$(OBJS)
	$(AR) rcs gp_chatboard.a $(OBJS)
	cp gp_chatboard.a ../../lib/
	rm *.a *.o

clean:
	rm -f *.o *~
 
You are right. In my makefile I don't have any reference of it.
But I can assure you that it works, as I sometimes change some flags and the compiler do react differently.

Strange...
 
pea posted on May 18 2005 at 08:12 AM said:
Hi all,

Where is CFLAGS actually used in this makefile?  I checked all my makefiles and realised that the CFLAGS variable is not actually used anywhere.  Does make look for this variable and use it internally?

example from Mr.Mirko SDK
Code:
CC = arm-elf-gcc
LD = arm-elf-gcc
AS = arm-elf-as
AR = arm-elf-ar


INCLUDES = -I../../lib.src/include

CFLAGS = $(INCLUDES) -O2 -s -mtune=arm9tdmi
 
OBJS =  gp_chatboard.o

all:	$(OBJS)
	$(AR) rcs gp_chatboard.a $(OBJS)
	cp gp_chatboard.a ../../lib/
	rm *.a *.o

clean:
	rm -f *.o *~

CFLAGS is used HERE:
all: $(OBJS)

The compiler is now compiling all *.o files, and add the CFLAGS to each compile line.
the make command is doing this.

btw, you should update the SDK to 0.9.5 :)
 
Last edited by a moderator:
Back
Top