Subversion Repositories HelenOS

Rev

Rev 4342 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2479 jermar 1
LIBC_PREFIX = ../../lib/libc
2
SOFTINT_PREFIX = ../../lib/softint
4342 svoboda 3
 
1449 palkovsky 4
include $(LIBC_PREFIX)/Makefile.toolchain
3560 svoboda 5
include $(LIBC_PREFIX)/Makefile.app
1419 jermar 6
 
1449 palkovsky 7
OUTPUT = tetris
1466 palkovsky 8
SOURCES = shapes.c scores.c input.c tetris.c screen.c
1449 palkovsky 9
OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
1419 jermar 10
 
1449 palkovsky 11
.PHONY: all clean depend disasm
12
 
3211 svoboda 13
all: $(OUTPUT) $(OUTPUT).disasm
1449 palkovsky 14
 
15
-include Makefile.depend
16
 
17
depend:
18
	$(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend
19
 
20
$(OUTPUT): $(OBJECTS) $(LIBS)
3560 svoboda 21
	$(LD) -T $(LD_SCRIPT) $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map
1449 palkovsky 22
 
23
clean:
24
	-rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend *.o
25
 
3211 svoboda 26
disasm: $(OUTPUT).disasm
27
 
28
$(OUTPUT).disasm: $(OUTPUT)
29
	$(OBJDUMP) -d $< >$@
30
 
1449 palkovsky 31
%.o: %.S
32
	$(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@
33
 
34
%.o: %.s
35
	$(AS) $(AFLAGS) $< -o $@
36
 
37
%.o: %.c
38
	$(CC) $(DEFS) $(CFLAGS) -c $< -o $@