mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-05 21:40:56 +11:00
31 lines
654 B
Makefile
31 lines
654 B
Makefile
SHELLAPPS = zasm ed
|
|
APPTARGETS = ${SHELLAPPS:%=cfsin/%}
|
|
CFSTARGETS = $(APPTARGETS) cfsin/user.h
|
|
TARGET = os.bin
|
|
BASEDIR = ../..
|
|
ZASM = $(BASEDIR)/emul/zasm/zasm
|
|
KERNEL = $(BASEDIR)/kernel
|
|
APPS = $(BASEDIR)/apps
|
|
CFSPACK = $(BASEDIR)/tools/cfspack/cfspack
|
|
|
|
.PHONY: all
|
|
all: $(TARGET) floppy.cfs
|
|
$(TARGET): glue.asm
|
|
$(ZASM) $(KERNEL) $(APPS) < glue.asm > $@
|
|
|
|
$(CFSPACK):
|
|
make -C $(BASEDIR)/tools/cfspack
|
|
|
|
floppy.cfs: $(CFSTARGETS) $(CFSPACK)
|
|
$(CFSPACK) cfsin > $@
|
|
|
|
$(APPTARGETS):
|
|
$(ZASM) $(KERNEL) $(APPS) user.h < $(APPS)/${@:cfsin/%=%}/glue.asm > $@
|
|
|
|
cfsin/user.h: user.h
|
|
cp user.h $@
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
rm -f $(CFSTARGETS) floppy.cfs $(TARGET)
|