mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
The Sortix programs are now compiled into initrd/.
This commit is contained in:
parent
2c18d43359
commit
f26e6e803a
6 changed files with 48 additions and 21 deletions
5
Makefile
5
Makefile
|
@ -100,12 +100,7 @@ iso: all debsource
|
|||
mkdir -p $(ISODIR)
|
||||
cp -r isosrc/. $(ISODIR)
|
||||
cp sortix/sortix.bin $(ISODIR)/boot
|
||||
mkdir -p $(INITRDDIR)
|
||||
cp hello/hello $(INITRDDIR)
|
||||
cp pong/pong $(INITRDDIR)
|
||||
for F in init cat sh mxsh clear ls help uname; do cp utils/$$F $(INITRDDIR); done
|
||||
(cd $(INITRDDIR) && ../mkinitrd/mkinitrd * -o ../$(ISODIR)/boot/sortix.initrd)
|
||||
rm -rf $(INITRDDIR)
|
||||
cp builds/$(DEBSRCNAME)-src.tar.gz $(ISODIR)
|
||||
grub-mkrescue -o $(ISOFILE) $(ISODIR)
|
||||
rm -rf $(ISODIR)
|
||||
|
|
|
@ -2,14 +2,25 @@
|
|||
OSROOT=..
|
||||
include ../crosscompilemakefile.mak
|
||||
|
||||
all: hello
|
||||
INITRDDIR:=../initrd
|
||||
LOCALBINARIES:=\
|
||||
hello \
|
||||
|
||||
hello: hello.o
|
||||
$(LD) $(LDFLAGS) hello.o -o hello $(LIBS)
|
||||
BINARIES:=$(addprefix $(INITRDDIR)/,$(BINARIES))
|
||||
|
||||
hello.o: hello.cpp
|
||||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -O2 -c hello.cpp -o hello.o
|
||||
all: install
|
||||
|
||||
install: $(LOCALBINARIES)
|
||||
cp $(LOCALBINARIES) $(INITRDDIR)
|
||||
rm -f $(LOCALBINARIES)
|
||||
|
||||
%: %.cpp
|
||||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -O2 -c $< -o $@.o
|
||||
$(LD) $(LDFLAGS) $@.o -o $@ $(LIBS)
|
||||
|
||||
sh: mxsh
|
||||
cp $< $@
|
||||
|
||||
clean:
|
||||
rm -f hello.o hello
|
||||
rm -f $(BINARIES) $(LOCALBINARIES) *.o
|
||||
|
||||
|
|
2
initrd/.gitignore
vendored
Normal file
2
initrd/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
*
|
||||
!.gitignore
|
|
@ -2,14 +2,25 @@
|
|||
OSROOT=..
|
||||
include ../crosscompilemakefile.mak
|
||||
|
||||
all: pong
|
||||
INITRDDIR:=../initrd
|
||||
LOCALBINARIES:=\
|
||||
pong \
|
||||
|
||||
pong: pong.o
|
||||
$(LD) $(LDFLAGS) pong.o -o pong $(LIBS)
|
||||
BINARIES:=$(addprefix $(INITRDDIR)/,$(BINARIES))
|
||||
|
||||
pong.o: pong.cpp
|
||||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -O2 -c pong.cpp -o pong.o
|
||||
all: install
|
||||
|
||||
install: $(LOCALBINARIES)
|
||||
cp $(LOCALBINARIES) $(INITRDDIR)
|
||||
rm -f $(LOCALBINARIES)
|
||||
|
||||
%: %.cpp
|
||||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -O2 -c $< -o $@.o
|
||||
$(LD) $(LDFLAGS) $@.o -o $@ $(LIBS)
|
||||
|
||||
sh: mxsh
|
||||
cp $< $@
|
||||
|
||||
clean:
|
||||
rm -f pong.o pong
|
||||
rm -f $(BINARIES) $(LOCALBINARIES) *.o
|
||||
|
||||
|
|
1
utils/.gitignore
vendored
Normal file
1
utils/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
*.o
|
|
@ -2,7 +2,8 @@
|
|||
OSROOT=..
|
||||
include ../crosscompilemakefile.mak
|
||||
|
||||
BINARIES:=\
|
||||
INITRDDIR:=../initrd
|
||||
LOCALBINARIES:=\
|
||||
init \
|
||||
cat \
|
||||
sh \
|
||||
|
@ -12,15 +13,21 @@ ls \
|
|||
help \
|
||||
uname \
|
||||
|
||||
all: $(BINARIES)
|
||||
BINARIES:=$(addprefix $(INITRDDIR)/,$(BINARIES))
|
||||
|
||||
all: install
|
||||
|
||||
install: $(LOCALBINARIES)
|
||||
cp $(LOCALBINARIES) $(INITRDDIR)
|
||||
rm -f $(LOCALBINARIES)
|
||||
|
||||
%: %.cpp
|
||||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -O2 -c $< -o $@.o
|
||||
$(LD) $(LDFLAGS) $@.o -o $@ $(LIBS)
|
||||
|
||||
sh: mxsh
|
||||
cp mxsh sh
|
||||
cp $< $@
|
||||
|
||||
clean:
|
||||
rm -f $(BINARIES) *.o
|
||||
rm -f $(BINARIES) $(LOCALBINARIES) *.o
|
||||
|
||||
|
|
Loading…
Reference in a new issue