Subversion Repositories HelenOS-historic

Rev

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

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