Rev 4342 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4342 | Rev 4354 | ||
---|---|---|---|
Line 31... | Line 31... | ||
31 | ## Setup toolchain |
31 | ## Setup toolchain |
32 | # |
32 | # |
33 | 33 | ||
34 | LIBC_PREFIX = ../../lib/libc |
34 | LIBC_PREFIX = ../../lib/libc |
35 | SOFTINT_PREFIX = ../../lib/softint |
35 | SOFTINT_PREFIX = ../../lib/softint |
36 | RTLD_PREFIX = ../../lib/rtld |
- | |
37 | 36 | ||
38 | include $(LIBC_PREFIX)/Makefile.toolchain |
37 | include $(LIBC_PREFIX)/Makefile.toolchain |
39 | 38 | ||
40 | CFLAGS += -D__32_BITS__ -I../../srv/loader/include -I../../lib/rtld/include -I../../lib/libc -O0 |
39 | CFLAGS += -D__32_BITS__ -I../../srv/loader/include -I../../lib/rtld/include -I../../lib/libc -O0 |
41 | #LFLAGS := -Bdynamic -I/lib/rtld -rpath-link $(RTLD_PREFIX) |
- | |
42 | LFLAGS := --whole-archive $(RTLD_PREFIX)/librtld.a --no-whole-archive |
- | |
43 | - | ||
44 | #LIBS = $(LIBC_PREFIX)/shared/libc.so.0 |
- | |
45 | #LIBS = $(LIBC_PREFIX)/libc.a $(SOFTINT_PREFIX)/libsoftint.a ../../lib/libtest/libtest.so.0 |
- | |
46 | LIBS = $(LIBC_PREFIX)/libc.a $(SOFTINT_PREFIX)/libsoftint.a |
40 | LIBS = $(LIBC_PREFIX)/libc.a $(SOFTINT_PREFIX)/libsoftint.a |
47 | # |
- | |
48 | 41 | ||
49 | ## Sources |
42 | ## Sources |
50 | # |
43 | # |
51 | 44 | ||
52 | OUTPUT = dltest2 |
45 | OUTPUT = dltest2 |
Line 67... | Line 60... | ||
67 | depend: |
60 | depend: |
68 | $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend |
61 | $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend |
69 | 62 | ||
70 | $(OUTPUT): $(OBJECTS) $(LIBS) |
63 | $(OUTPUT): $(OBJECTS) $(LIBS) |
71 | $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LFLAGS) $(LIBS) -o $@ -Map $(OUTPUT).map |
64 | $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LFLAGS) $(LIBS) -o $@ -Map $(OUTPUT).map |
72 | # $(LD) -T $(LIBC_PREFIX)/shared/arch/$(UARCH)/_link2.ld $(OBJECTS) $(LFLAGS) $(LIBS) -o $@ -Map $(OUTPUT).map |
- | |
73 | 65 | ||
74 | disasm: |
66 | disasm: |
75 | $(OBJDUMP) -d $(OUTPUT) >$(OUTPUT).disasm |
67 | $(OBJDUMP) -d $(OUTPUT) >$(OUTPUT).disasm |
76 | 68 | ||
77 | %.o: %.S |
69 | %.o: %.S |