Moved start.s into the subdirs for x86 and x64.
This commit is contained in:
parent
739b296a95
commit
ab2b14fc16
|
@ -17,6 +17,7 @@ ifeq ($(CPU),x64)
|
||||||
CPULDFLAGS=-melf_x86_64
|
CPULDFLAGS=-melf_x86_64
|
||||||
CPUASFLAGS=-64
|
CPUASFLAGS=-64
|
||||||
CPUNASMFLAGS=-felf64
|
CPUNASMFLAGS=-felf64
|
||||||
|
LIBMAXSI_NO_SHARED=1 # This doesn't work yet
|
||||||
endif
|
endif
|
||||||
|
|
||||||
DEFINES=-DLIBMAXSI_LIBRARY -DSORTIX $(CPUDEFINES)
|
DEFINES=-DLIBMAXSI_LIBRARY -DSORTIX $(CPUDEFINES)
|
||||||
|
@ -52,6 +53,7 @@ process.o \
|
||||||
thread.o \
|
thread.o \
|
||||||
io.o \
|
io.o \
|
||||||
init.o \
|
init.o \
|
||||||
|
start.o \
|
||||||
|
|
||||||
HEADERS=\
|
HEADERS=\
|
||||||
error.h \
|
error.h \
|
||||||
|
@ -70,19 +72,25 @@ sortix-keyboard.h \
|
||||||
sortix-sound.h \
|
sortix-sound.h \
|
||||||
|
|
||||||
OBJS:=$(LIBMAXSIOBJS)
|
OBJS:=$(LIBMAXSIOBJS)
|
||||||
BINS:=libmaxsi.so
|
BINS:=
|
||||||
|
|
||||||
|
ifndef LIBMAXSI_NO_SHARED
|
||||||
|
BINS:=$(BINS) libmaxsi.so
|
||||||
|
endif
|
||||||
|
|
||||||
ifndef LIBMAXSI_NO_STATIC
|
ifndef LIBMAXSI_NO_STATIC
|
||||||
BINS:=$(BINS) libmaxsi.a
|
BINS:=$(BINS) libmaxsi.a
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifndef LIBMAXSI_NO_SORTIX
|
ifndef LIBMAXSI_NO_SORTIX
|
||||||
BINS:=$(BINS) libmaxsi-sortix.a start.o
|
BINS:=$(BINS) libmaxsi-sortix.a
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifndef LIBMAXSI_NO_LIBC
|
ifndef LIBMAXSI_NO_LIBC
|
||||||
OBJS:=$(OBJS) $(COBJS)
|
OBJS:=$(OBJS) $(COBJS)
|
||||||
BINS:=$(BINS) libc.so
|
ifndef LIBMAXSI_NO_SHARED
|
||||||
|
BINS:=$(BINS) libc.so
|
||||||
|
endif
|
||||||
ifndef LIBMAXSI_NO_STATIC
|
ifndef LIBMAXSI_NO_STATIC
|
||||||
BINS:=$(BINS) libc.a
|
BINS:=$(BINS) libc.a
|
||||||
endif
|
endif
|
||||||
|
@ -114,6 +122,9 @@ libc.a: libmaxsi.a
|
||||||
libc.so: libmaxsi.so
|
libc.so: libmaxsi.so
|
||||||
ln -sf $< $@
|
ln -sf $< $@
|
||||||
|
|
||||||
|
start.o: $(CPU)/start.o
|
||||||
|
ln -sf $< $@
|
||||||
|
|
||||||
# libmaxsi
|
# libmaxsi
|
||||||
|
|
||||||
*.cpp: $(HEADERS)
|
*.cpp: $(HEADERS)
|
||||||
|
@ -155,5 +166,5 @@ sortix/%.o: sortix/%.cpp
|
||||||
g++ -c $< -o $@ $(SORTIXFLAGS)
|
g++ -c $< -o $@ $(SORTIXFLAGS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o sortix/*.o c/*.o *.a *.so $(CHEADERS) $(HEADERS)
|
rm -f *.o sortix/*.o c/*.o x86/*.o x64/*.o *.a *.so $(CHEADERS) $(HEADERS)
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
/******************************************************************************
|
||||||
|
|
||||||
|
COPYRIGHT(C) JONAS 'SORTIE' TERMANSEN 2011.
|
||||||
|
|
||||||
|
This file is part of LibMaxsi.
|
||||||
|
|
||||||
|
LibMaxsi is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU Lesser General Public License as published by the Free
|
||||||
|
Software Foundation, either version 3 of the License, or (at your option)
|
||||||
|
any later version.
|
||||||
|
|
||||||
|
LibMaxsi is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
|
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
|
||||||
|
more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public License
|
||||||
|
along with LibMaxsi. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
start.s
|
||||||
|
A stub for linking to the C runtime on Sortix.
|
||||||
|
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
.globl _start
|
||||||
|
|
||||||
|
.section .text
|
||||||
|
|
||||||
|
.type _start, @function
|
||||||
|
_start:
|
||||||
|
|
||||||
|
call initialize_standard_library
|
||||||
|
|
||||||
|
# Run main
|
||||||
|
# TODO: Sortix should set the initial values before this point!
|
||||||
|
call main
|
||||||
|
|
||||||
|
# Terminate the process with main's exit code.
|
||||||
|
movl %eax, %edi
|
||||||
|
call exit
|
||||||
|
|
Loading…
Reference in New Issue