Rev 4340 | Rev 4354 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
LIBC_PREFIX = ../../lib/libc
SOFTINT_PREFIX = ../../lib/softint
RTLD_PREFIX = ../../lib/rtld
include $(LIBC_PREFIX)/Makefile.toolchain
include $(LIBC_PREFIX)/Makefile.app
OUTPUT = tetris
SOURCES = shapes.c scores.c input.c tetris.c screen.c
OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
.PHONY: all clean depend disasm
all: $(OUTPUT) $(OUTPUT).disasm
-include Makefile.depend
depend:
$(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend
$(OUTPUT): $(OBJECTS) $(LIBS)
$(LD) -T $(LD_SCRIPT) $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map
clean:
-rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend *.o
disasm: $(OUTPUT).disasm
$(OUTPUT).disasm: $(OUTPUT)
$(OBJDUMP) -d $< >$@
%.o: %.S
$(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@
%.o: %.s
$(AS) $(AFLAGS) $< -o $@
%.o: %.c
$(CC) $(DEFS) $(CFLAGS) -c $< -o $@