Subversion Repositories HelenOS

Rev

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

Rev 3597 Rev 4377
Line 27... Line 27...
27
#
27
#
28
 
28
 
29
## Setup toolchain
29
## Setup toolchain
30
#
30
#
31
 
31
 
32
include ../../Makefile.config
-
 
33
 
-
 
34
LIBC_PREFIX = ../../lib/libc
32
LIBC_PREFIX = ../../lib/libc
35
SOFTINT_PREFIX = ../../lib/softint
33
SOFTINT_PREFIX = ../../lib/softint
-
 
34
 
36
include $(LIBC_PREFIX)/Makefile.toolchain 
35
include $(LIBC_PREFIX)/Makefile.toolchain
37
 
36
 
38
CFLAGS += -I. -I../kbd/include -I../fb
37
CFLAGS += -I. -I../kbd/include -I../fb
39
 
38
 
40
LIBS = $(LIBC_PREFIX)/libc.a
39
LIBS = $(LIBC_PREFIX)/libc.a
41
 
40
 
Line 57... Line 56...
57
 
56
 
58
GENERIC_OBJECTS := $(addsuffix .o,$(basename $(GENERIC_SOURCES))) \
57
GENERIC_OBJECTS := $(addsuffix .o,$(basename $(GENERIC_SOURCES))) \
59
			$(addsuffix .o,$(basename $(IMAGES)))	
58
			$(addsuffix .o,$(basename $(IMAGES)))	
60
ARCH_OBJECTS := $(addsuffix .o,$(basename $(ARCH_SOURCES)))
59
ARCH_OBJECTS := $(addsuffix .o,$(basename $(ARCH_SOURCES)))
61
 
60
 
-
 
61
OBJECTS := $(GENERIC_OBJECTS) $(ARCH_OBJECTS)
-
 
62
 
62
.PHONY: all clean depend disasm
63
.PHONY: all clean depend disasm
63
 
64
 
64
all: $(OUTPUT) $(OUTPUT).disasm
65
all: $(OUTPUT) $(OUTPUT).disasm
65
 
66
 
66
-include Makefile.depend
67
-include Makefile.depend
67
 
68
 
68
clean:
69
clean:
69
	-rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend
70
	-rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS)
70
 
71
 
71
depend:
72
depend:
72
	$(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend
73
	$(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend
73
 
74
 
74
$(OUTPUT): $(ARCH_OBJECTS) $(GENERIC_OBJECTS) $(LIBS)
75
$(OUTPUT): $(OBJECTS) $(LIBS)
75
	$(LD) -T $(LIBC_PREFIX)/arch/$(ARCH)/_link.ld $(GENERIC_OBJECTS) $(ARCH_OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map
76
	$(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map
76
 
77
 
77
disasm: $(OUTPUT).disasm
78
disasm: $(OUTPUT).disasm
78
 
79
 
79
$(OUTPUT).disasm: $(OUTPUT)
80
$(OUTPUT).disasm: $(OUTPUT)
80
	$(OBJDUMP) -d $< >$@
81
	$(OBJDUMP) -d $< >$@