2016-06-26 16:48:36 +00:00
|
|
|
##
|
|
|
|
# Build all projects
|
|
|
|
##
|
2016-05-21 11:07:56 +00:00
|
|
|
|
2016-06-26 16:48:36 +00:00
|
|
|
PROJECTS = $(shell ls --file-type --ignore=libs --ignore=kernels --ignore=include | grep / | sed "s|/||")
|
2016-05-21 11:07:56 +00:00
|
|
|
|
2016-06-26 16:48:36 +00:00
|
|
|
LIBS = $(filter lib%, $(PROJECTS))
|
|
|
|
KERNELS = $(filter-out lib%, $(PROJECTS))
|
|
|
|
|
|
|
|
all: $(KERNELS) boot.img
|
2016-05-21 11:07:56 +00:00
|
|
|
|
|
|
|
.PHONY: $(PROJECTS)
|
2016-06-26 16:48:36 +00:00
|
|
|
$(KERNELS): dirs $(LIBS)
|
|
|
|
make -C $@ $(ARGS)
|
|
|
|
|
|
|
|
$(LIBS): dirs
|
2016-05-30 17:48:07 +00:00
|
|
|
make -C $@ $(ARGS)
|
2016-06-26 16:48:36 +00:00
|
|
|
|
|
|
|
dirs:
|
|
|
|
mkdir -p libs
|
|
|
|
mkdir -p kernels
|
|
|
|
|
|
|
|
boot.img: $(PROJECTS)
|
|
|
|
mformat -C -f 1440 -v VIDEO -i boot.img ::
|
|
|
|
mcopy -i boot.img \
|
|
|
|
kernels/* \
|
|
|
|
syslinux.cfg \
|
|
|
|
/boot/syslinux/libcom32.c32 \
|
|
|
|
/boot/syslinux/libutil.c32 \
|
|
|
|
/boot/syslinux/menu.c32 \
|
|
|
|
/boot/syslinux/mboot.c32 \
|
|
|
|
::
|
|
|
|
syslinux boot.img
|
|
|
|
mdir -i boot.img ::
|
|
|
|
|
2016-06-26 19:58:31 +00:00
|
|
|
deploy: $(KERNELS)
|
|
|
|
cp ./kernels/* /srv/tftp/
|
|
|
|
|
2016-06-26 16:48:36 +00:00
|
|
|
run: boot.img
|
|
|
|
qemu-system-i386 boot.img -serial stdio
|