INCLUDE = ../include
CC = gcc -march=i386
LD = ld
AS = as
CCFLG = -O2 -c -nostdinc -fno-builtin -fstrength-reduce -fomit-frame-pointer -finline-functions -I$(INCLUDE) -I.
%.o: %.c
@echo Making $<
@$(CC) $(CCFLG) $< -o $@
@cp *.o ../obj
%.o:%.s
@echo Making $<
@$(AS) -o $*.o $<
@cp *.o ../obj
all: traps.o printk.o vsprintf.o
clean:
rm -f *.o
rm -f ../obj/traps.o ../obj/vsprintf.o ../obj/printk.o
--------tools目录下makefile
CC = gcc
targets = build_image
%.o : %.c
@echo Making $<
@$(CC) -Wall $< -o $@
all: $(targets)
clean:
rm -f $(targets)
rm -f *.bak