Rev 4341 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4341 | Rev 4342 | ||
---|---|---|---|
Line 25... | Line 25... | ||
25 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
25 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
26 | # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | # |
27 | # |
28 | 28 | ||
29 | include ../../../version |
29 | include ../../../version |
30 | -include ../../../Makefile.config |
- | |
31 | 30 | ||
32 | ## Setup toolchain |
31 | ## Setup toolchain |
33 | # |
32 | # |
34 | 33 | ||
35 | LIBC_PREFIX = ../../lib/libc |
34 | LIBC_PREFIX = ../../lib/libc |
36 | SOFTINT_PREFIX = ../../lib/softint |
35 | SOFTINT_PREFIX = ../../lib/softint |
37 | RTLD_PREFIX = ../../lib/rtld |
36 | RTLD_PREFIX = ../../lib/rtld |
- | 37 | ||
38 | include $(LIBC_PREFIX)/Makefile.toolchain |
38 | include $(LIBC_PREFIX)/Makefile.toolchain |
39 | 39 | ||
40 | CFLAGS += -D__32_BITS__ -I../../srv/loader/include -I../../lib/rtld/include -I../../lib/libc -O0 |
40 | 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) |
41 | #LFLAGS := -Bdynamic -I/lib/rtld -rpath-link $(RTLD_PREFIX) |
42 | LFLAGS := --whole-archive $(RTLD_PREFIX)/librtld.a --no-whole-archive |
42 | LFLAGS := --whole-archive $(RTLD_PREFIX)/librtld.a --no-whole-archive |
Line 60... | Line 60... | ||
60 | all: $(OUTPUT) disasm |
60 | all: $(OUTPUT) disasm |
61 | 61 | ||
62 | -include Makefile.depend |
62 | -include Makefile.depend |
63 | 63 | ||
64 | clean: |
64 | clean: |
65 | -rm -f $(OUTPUT) $(OBJECTS) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend arch/$(ARCH)/_link.ld |
65 | -rm -f $(OUTPUT) $(OBJECTS) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend arch/$(UARCH)/_link.ld |
66 | 66 | ||
67 | depend: |
67 | depend: |
68 | $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend |
68 | $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend |
69 | 69 | ||
70 | $(OUTPUT): $(OBJECTS) $(LIBS) |
70 | $(OUTPUT): $(OBJECTS) $(LIBS) |
71 | $(LD) -T $(LIBC_PREFIX)/arch/$(ARCH)/_link.ld $(OBJECTS) $(LFLAGS) $(LIBS) -o $@ -Map $(OUTPUT).map |
71 | $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LFLAGS) $(LIBS) -o $@ -Map $(OUTPUT).map |
72 | # $(LD) -T $(LIBC_PREFIX)/shared/arch/$(ARCH)/_link2.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 | 73 | ||
74 | disasm: |
74 | disasm: |
75 | $(OBJDUMP) -d $(OUTPUT) >$(OUTPUT).disasm |
75 | $(OBJDUMP) -d $(OUTPUT) >$(OUTPUT).disasm |
76 | 76 | ||
77 | %.o: %.S |
77 | %.o: %.S |