CC=arm-elf-gcc
LD=arm-elf-ld
CFLAGS= -c -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -g -mapcs-32 -march=armv4 -mtune=arm7tdmi
LDFLAGS= -N -p -X -T $(LDS)
LIB=
SRC = $(wildcard $(CURDIR)/*.c)
ASRC = $(wildcard $(CURDIR)/*.S)
SRC += $(ASRC)
OBJ := $(patsubst %.c,%.o,$(SRC))
OBJ := $(patsubst %.S,%.o,$(OBJ))
LDS = neo.lds
all: image.elf
@echo $(OBJ)
image.elf: $(OBJ)
$(LD) $(LDFLAGS) $(OBJ) -o $@
%.o: %.c
$(CC) $(CFLAGS) $< -o $@
%.o: %.S
$(CC) $(CFLAGS) $< -o $@
clean:
rm -rf *.o *.elf
沒有留言:
張貼留言