Changes to make gcc compile our libraries too (Joren)

This commit is contained in:
Ben Gras
2005-10-21 11:19:35 +00:00
parent fd63815169
commit 69a0586adf
29 changed files with 861 additions and 3082 deletions
+6 -8
View File
@@ -1,11 +1,9 @@
# Makefile for lib/i386.
MAKE = exec make -$(MAKEFLAGS)
SUBDIRS = \
int64 \
misc \
rts \
string
install:
cd em && $(MAKE)
cd head && $(MAKE)
cd int64 && $(MAKE)
cd misc && $(MAKE)
cd rts && $(MAKE)
cd string && $(MAKE)
include ../Makefile.inc
+16 -56
View File
@@ -1,61 +1,21 @@
# Makefile for lib/i386/int64.
CFLAGS = -O -D_MINIX -D_POSIX_SOURCE -Was-ack
CC1 = $(CC) $(CFLAGS) -c
CFLAGS = -O -D_MINIX -D_POSIX_SOURCE
LIBRARY = ../../libc.a
all: $(LIBRARY)
LIBRARIES = libc
OBJECTS = \
$(LIBRARY)(add64.o) \
$(LIBRARY)(add64u.o) \
$(LIBRARY)(cmp64.o) \
$(LIBRARY)(cv64u.o) \
$(LIBRARY)(cvu64.o) \
$(LIBRARY)(diff64.o) \
$(LIBRARY)(div64u.o) \
$(LIBRARY)(ex64.o) \
$(LIBRARY)(make64.o) \
$(LIBRARY)(mul64u.o) \
$(LIBRARY)(sub64.o) \
$(LIBRARY)(sub64u.o) \
libc_OBJECTS = \
add64.o \
add64u.o \
cmp64.o \
cv64u.o \
cvu64.o \
diff64.o \
div64u.o \
ex64.o \
make64.o \
mul64u.o \
sub64.o \
sub64u.o \
$(LIBRARY): $(OBJECTS)
aal cr $@ *.o
rm *.o
$(LIBRARY)(add64.o): add64.s
$(CC1) add64.s
$(LIBRARY)(add64u.o): add64u.s
$(CC1) add64u.s
$(LIBRARY)(cmp64.o): cmp64.s
$(CC1) cmp64.s
$(LIBRARY)(cv64u.o): cv64u.s
$(CC1) cv64u.s
$(LIBRARY)(cvu64.o): cvu64.s
$(CC1) cvu64.s
$(LIBRARY)(diff64.o): diff64.s
$(CC1) diff64.s
$(LIBRARY)(div64u.o): div64u.s
$(CC1) div64u.s
$(LIBRARY)(ex64.o): ex64.s
$(CC1) ex64.s
$(LIBRARY)(make64.o): make64.s
$(CC1) make64.s
$(LIBRARY)(mul64u.o): mul64u.s
$(CC1) mul64u.s
$(LIBRARY)(sub64.o): sub64.s
$(CC1) sub64.s
$(LIBRARY)(sub64u.o): sub64u.s
$(CC1) sub64u.s
include ../../Makefile.inc
+21 -76
View File
@@ -1,81 +1,26 @@
# Makefile for lib/i386/misc.
CFLAGS = -O -D_MINIX -D_POSIX_SOURCE -Was-ack
CC1 = $(CC) $(CFLAGS) -c
CFLAGS = -O -D_MINIX -D_POSIX_SOURCE
LIBRARY = ../../libc.a
all: $(LIBRARY)
LIBRARIES = libc
OBJECTS = \
$(LIBRARY)(alloca.o) \
$(LIBRARY)(get_bp.o) \
$(LIBRARY)(getprocessor.o) \
$(LIBRARY)(io_inb.o) \
$(LIBRARY)(io_inl.o) \
$(LIBRARY)(io_insb.o) \
$(LIBRARY)(io_insl.o) \
$(LIBRARY)(io_insw.o) \
$(LIBRARY)(io_intr.o) \
$(LIBRARY)(io_inw.o) \
$(LIBRARY)(io_outb.o) \
$(LIBRARY)(io_outl.o) \
$(LIBRARY)(io_outsb.o) \
$(LIBRARY)(io_outsl.o) \
$(LIBRARY)(io_outsw.o) \
$(LIBRARY)(io_outw.o) \
$(LIBRARY)(oneC_sum.o) \
libc_OBJECTS = \
alloca.o \
get_bp.o \
getprocessor.o \
io_inb.o \
io_inl.o \
io_insb.o \
io_insl.o \
io_insw.o \
io_intr.o \
io_inw.o \
io_outb.o \
io_outl.o \
io_outsb.o \
io_outsl.o \
io_outsw.o \
io_outw.o \
oneC_sum.o \
$(LIBRARY): $(OBJECTS)
aal cr $@ *.o
rm *.o
$(LIBRARY)(alloca.o): alloca.s
$(CC1) alloca.s
$(LIBRARY)(get_bp.o): get_bp.s
$(CC1) get_bp.s
$(LIBRARY)(getprocessor.o): getprocessor.s
$(CC1) getprocessor.s
$(LIBRARY)(io_inb.o): io_inb.s
$(CC1) io_inb.s
$(LIBRARY)(io_inl.o): io_inl.s
$(CC1) io_inl.s
$(LIBRARY)(io_insb.o): io_insb.s
$(CC1) io_insb.s
$(LIBRARY)(io_insl.o): io_insl.s
$(CC1) io_insl.s
$(LIBRARY)(io_insw.o): io_insw.s
$(CC1) io_insw.s
$(LIBRARY)(io_intr.o): io_intr.s
$(CC1) io_intr.s
$(LIBRARY)(io_inw.o): io_inw.s
$(CC1) io_inw.s
$(LIBRARY)(io_outb.o): io_outb.s
$(CC1) io_outb.s
$(LIBRARY)(io_outl.o): io_outl.s
$(CC1) io_outl.s
$(LIBRARY)(io_outsb.o): io_outsb.s
$(CC1) io_outsb.s
$(LIBRARY)(io_outsl.o): io_outsl.s
$(CC1) io_outsl.s
$(LIBRARY)(io_outsw.o): io_outsw.s
$(CC1) io_outsw.s
$(LIBRARY)(io_outw.o): io_outw.s
$(CC1) io_outw.s
$(LIBRARY)(oneC_sum.o): oneC_sum.s
$(CC1) oneC_sum.s
include ../../Makefile.inc
+12 -37
View File
@@ -1,42 +1,17 @@
# Makefile for lib/i386/rts.
CFLAGS = -O -D_MINIX -D_POSIX_SOURCE -Was-ack
CC1 = $(CC) $(CFLAGS) -c
CFLAGS = -O -D_MINIX -D_POSIX_SOURCE
LIBRARY = ../../libc.a
LIBRARIES = libc
all: \
../../crtso.o \
../../m2rtso.o \
../../prtso.o \
$(LIBRARY)
libc_OBJECTS = \
__sigreturn.o \
_ipc.o \
brksize.o \
TOPLEVEL_OBJECTS = \
crtso.o \
m2rtso.o \
prtso.o \
../../crtso.o: crtso.s
$(CC1) -c crtso.s
mv crtso.o $@
../../m2rtso.o: m2rtso.s
$(CC1) -c m2rtso.s
mv m2rtso.o $@
../../prtso.o: prtso.s
$(CC1) -c prtso.s
mv prtso.o $@
OBJECTS = \
$(LIBRARY)(__sigreturn.o) \
$(LIBRARY)(_ipc.o) \
$(LIBRARY)(brksize.o) \
$(LIBRARY): $(OBJECTS)
aal cr $@ *.o
rm *.o
$(LIBRARY)(__sigreturn.o): __sigreturn.s
$(CC1) __sigreturn.s
$(LIBRARY)(_ipc.o): _ipc.s
$(CC1) _ipc.s
$(LIBRARY)(brksize.o): brksize.s
$(CC1) brksize.s
include ../../Makefile.inc
+1 -4
View File
@@ -18,7 +18,7 @@ begdata:
.sect .bss
begbss:
.define crtso, ___main, __penviron, __penvp, __fpu_present
.define crtso, __penviron, __penvp, __fpu_present
.extern _main, _exit
.sect .text
crtso:
@@ -57,9 +57,6 @@ crtso:
hlt ! force a trap if exit fails
___main: ! for GCC
ret
.sect .rom
.data4 0 ! Separate I&D: *NULL == 0
! Also keeps the first string in the
+28 -108
View File
@@ -1,112 +1,32 @@
# Makefile for lib/i386/string.
CC1 = $(CC) -Was-ack -c
LIBRARIES = libc
LIBRARY = ../../libc.a
all: $(LIBRARY)
libc_OBJECTS = \
_memmove.o \
_strncat.o \
_strncmp.o \
_strncpy.o \
_strnlen.o \
bcmp.o \
bcopy.o \
bzero.o \
index.o \
memchr.o \
memcmp.o \
memcpy.o \
memmove.o \
memset.o \
rindex.o \
strcat.o \
strchr.o \
strcmp.o \
strcpy.o \
strlen.o \
strncat.o \
strncmp.o \
strncpy.o \
strnlen.o \
strrchr.o \
OBJECTS = \
$(LIBRARY)(_memmove.o) \
$(LIBRARY)(_strncat.o) \
$(LIBRARY)(_strncmp.o) \
$(LIBRARY)(_strncpy.o) \
$(LIBRARY)(_strnlen.o) \
$(LIBRARY)(bcmp.o) \
$(LIBRARY)(bcopy.o) \
$(LIBRARY)(bzero.o) \
$(LIBRARY)(index.o) \
$(LIBRARY)(memchr.o) \
$(LIBRARY)(memcmp.o) \
$(LIBRARY)(memcpy.o) \
$(LIBRARY)(memmove.o) \
$(LIBRARY)(memset.o) \
$(LIBRARY)(rindex.o) \
$(LIBRARY)(strcat.o) \
$(LIBRARY)(strchr.o) \
$(LIBRARY)(strcmp.o) \
$(LIBRARY)(strcpy.o) \
$(LIBRARY)(strlen.o) \
$(LIBRARY)(strncat.o) \
$(LIBRARY)(strncmp.o) \
$(LIBRARY)(strncpy.o) \
$(LIBRARY)(strnlen.o) \
$(LIBRARY)(strrchr.o) \
$(LIBRARY): $(OBJECTS)
aal cr $@ *.o
rm *.o
$(LIBRARY)(_memmove.o): _memmove.s
$(CC1) _memmove.s
$(LIBRARY)(_strncat.o): _strncat.s
$(CC1) _strncat.s
$(LIBRARY)(_strncmp.o): _strncmp.s
$(CC1) _strncmp.s
$(LIBRARY)(_strncpy.o): _strncpy.s
$(CC1) _strncpy.s
$(LIBRARY)(_strnlen.o): _strnlen.s
$(CC1) _strnlen.s
$(LIBRARY)(bcmp.o): bcmp.s
$(CC1) bcmp.s
$(LIBRARY)(bcopy.o): bcopy.s
$(CC1) bcopy.s
$(LIBRARY)(bzero.o): bzero.s
$(CC1) bzero.s
$(LIBRARY)(index.o): index.s
$(CC1) index.s
$(LIBRARY)(memchr.o): memchr.s
$(CC1) memchr.s
$(LIBRARY)(memcmp.o): memcmp.s
$(CC1) memcmp.s
$(LIBRARY)(memcpy.o): memcpy.s
$(CC1) memcpy.s
$(LIBRARY)(memmove.o): memmove.s
$(CC1) memmove.s
$(LIBRARY)(memset.o): memset.s
$(CC1) memset.s
$(LIBRARY)(rindex.o): rindex.s
$(CC1) rindex.s
$(LIBRARY)(strcat.o): strcat.s
$(CC1) strcat.s
$(LIBRARY)(strchr.o): strchr.s
$(CC1) strchr.s
$(LIBRARY)(strcmp.o): strcmp.s
$(CC1) strcmp.s
$(LIBRARY)(strcpy.o): strcpy.s
$(CC1) strcpy.s
$(LIBRARY)(strlen.o): strlen.s
$(CC1) strlen.s
$(LIBRARY)(strncat.o): strncat.s
$(CC1) strncat.s
$(LIBRARY)(strncmp.o): strncmp.s
$(CC1) strncmp.s
$(LIBRARY)(strncpy.o): strncpy.s
$(CC1) strncpy.s
$(LIBRARY)(strnlen.o): strnlen.s
$(CC1) strnlen.s
$(LIBRARY)(strrchr.o): strrchr.s
$(CC1) strrchr.s
include ../../Makefile.inc