source: mainline/uspace/app/tetris/Makefile@ d8ef374

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since d8ef374 was e035612, checked in by Martin Decky <martin@…>, 16 years ago

make parallel build (with -j n) possible

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