source: mainline/uspace/app/tetris/Makefile@ 24d6efc

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 24d6efc was 24d6efc, checked in by Jiri Svoboda <jirik.svoboda@…>, 17 years ago

Always include Makefile.config instead of passing ARCH and COMPILER to child make on the command line. Allows running make on individual apps and allows more configuration options.

  • Property mode set to 100644
File size: 882 bytes
Line 
1include ../../Makefile.config
2
3LIBC_PREFIX = ../../lib/libc
4SOFTINT_PREFIX = ../../lib/softint
5include $(LIBC_PREFIX)/Makefile.toolchain
6
7LIBS = $(LIBC_PREFIX)/libc.a
8
9OUTPUT = tetris
10SOURCES = shapes.c scores.c input.c tetris.c screen.c
11OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
12
13.PHONY: all clean depend disasm
14
15all: $(OUTPUT) $(OUTPUT).disasm
16
17-include Makefile.depend
18
19depend:
20 $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend
21
22$(OUTPUT): $(OBJECTS) $(LIBS)
23 $(LD) -T $(LIBC_PREFIX)/arch/$(ARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map
24
25clean:
26 -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend *.o
27
28disasm: $(OUTPUT).disasm
29
30$(OUTPUT).disasm: $(OUTPUT)
31 $(OBJDUMP) -d $< >$@
32
33%.o: %.S
34 $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@
35
36%.o: %.s
37 $(AS) $(AFLAGS) $< -o $@
38
39%.o: %.c
40 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@
Note: See TracBrowser for help on using the repository browser.