Subversion Repositories HelenOS

Rev

Rev 3386 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3386 Rev 4153
Line 29... Line 29...
29
## Setup toolchain
29
## Setup toolchain
30
#
30
#
31
 
31
 
32
LIBC_PREFIX = ../../../lib/libc
32
LIBC_PREFIX = ../../../lib/libc
33
LIBFS_PREFIX = ../../../lib/libfs
33
LIBFS_PREFIX = ../../../lib/libfs
-
 
34
LIBBLOCK_PREFIX = ../../../lib/libblock
34
SOFTINT_PREFIX = ../../../lib/softint
35
SOFTINT_PREFIX = ../../../lib/softint
-
 
36
 
35
include $(LIBC_PREFIX)/Makefile.toolchain
37
include $(LIBC_PREFIX)/Makefile.toolchain
36
 
38
 
37
CFLAGS += -I $(LIBFS_PREFIX)
39
CFLAGS += -I $(LIBFS_PREFIX) -I $(LIBBLOCK_PREFIX)
38
 
40
 
-
 
41
LIBS = \
39
LIBS = $(LIBC_PREFIX)/libc.a $(LIBFS_PREFIX)/libfs.a
42
	$(LIBFS_PREFIX)/libfs.a \
-
 
43
	$(LIBBLOCK_PREFIX)/libblock.a \
-
 
44
	$(LIBC_PREFIX)/libc.a
40
 
45
 
41
## Sources
46
## Sources
42
#
47
#
43
 
48
 
44
OUTPUT = fat
49
OUTPUT = fat
45
SOURCES = \
50
SOURCES = \
46
	fat.c \
51
	fat.c \
47
	fat_ops.c \
52
	fat_ops.c \
48
	fat_idx.c
53
	fat_idx.c \
-
 
54
	fat_dentry.c \
-
 
55
	fat_fat.c
49
 
56
 
50
OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
57
OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
51
 
58
 
52
.PHONY: all clean depend disasm
59
.PHONY: all clean depend disasm
53
 
60
 
54
all: $(OUTPUT) $(OUTPUT).disasm
61
all: $(OUTPUT) $(OUTPUT).disasm
55
 
62
 
56
-include Makefile.depend
63
-include Makefile.depend
57
 
64
 
58
clean:
65
clean:
59
	-rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend
66
	-rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS)
60
 
67
 
61
depend:
68
depend:
62
	$(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend
69
	$(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend
63
 
70
 
64
$(OUTPUT): $(OBJECTS) $(LIBS)
71
$(OUTPUT): $(OBJECTS) $(LIBS)
65
	$(LD) -T $(LIBC_PREFIX)/arch/$(ARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map
72
	$(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map
66
 
73
 
67
disasm: $(OUTPUT).disasm
74
disasm: $(OUTPUT).disasm
68
 
75
 
69
$(OUTPUT).disasm: $(OUTPUT)
76
$(OUTPUT).disasm: $(OUTPUT)
70
	$(OBJDUMP) -d $< >$@
77
	$(OBJDUMP) -d $< >$@