Commit df4c70ef authored by John P. Willis's avatar John P. Willis

Finish new build system

parent 3da789c4
LIBILXI_OBJS = asm.o cpu.o error.o host.o storage.o lexer.o inst.o util.o bus.o console.o signal.o message.o profile.o config.o disk.o help.o
VM_OBJS = ilxi.o asm.o cpu.o error.o host.o storage.o lexer.o inst.o util.o bus.o console.o signal.o message.o profile.o config.o disk.o help.o
#XIASM_OBJS = xiasm.o asm.o cpu.o lexer.o storage.o inst.o error.o util.o console.o bus.o signal.o message.o profile.o config.o
XIASM_OBJS = xiasm.o
MKDISK_OBJS = mkdisk.o disk.o asm.o cpu.o error.o host.o storage.o lexer.o inst.o util.o bus.o console.o signal.o message.o profile.o config.o
FBCFLAGS = -g -mt #-d STACKDEBUG -d INSTDEBUG #-d LEXDEBUG
#
# ILXI Virtual Machine
#
# Makefile (libilxi)
#
# Copyright 2016 John P. Willis <jpw@coherent-logic.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
#
#
BINFILES = xiasm mkdisk ilxi ilxi.xmf
all: vm xiasm util
dist: all
mkdir -p dist/
cp src/vm/ilxi dist/
cp src/util/mkdisk dist/
cp src/xiasm/xiasm dist/
cp doc/ilxi.xmf dist/
cp bin/.ilximrc dist/
lib:
cd src/lib; make
vm: lib
cd src/vm; make
xiasm: lib
cd src/xiasm; make
util: lib
cd src/util; make
all: vm assembler diskutil rom test libilxi
libilxi: libilxi.a
libilxi.so: $(LIBILXI_OBJS)
fbc $(FBCFLAGS) -dylib -x libilxi.so $(LIBILXI_OBJS)
libilxi.a: $(LIBILXI_OBJS)
fbc $(FBCFLAGS) -lib -x libilxi.a $(LIBILXI_OBJS)
diskutil: mkdisk
vm: ilxi
test: t_stack.bin
rom: rom.bin diskboot.bin xiasm
diskboot.bin: diskboot.xa
./xiasm diskboot.xa
rom.bin: rom.xa
./xiasm rom.xa
t_stack.bin: t_stack.xa
./xiasm t_stack.xa
assembler: xiasm
mkdisk: $(MKDISK_OBJS)
fbc $(FBCFLAGS) -x mkdisk $(MKDISK_OBJS)
xiasm: $(XIASM_OBJS) libilxi
fbc $(FBCFLAGS) -l ilxi -x xiasm $(XIASM_OBJS)
xiasm.o: xiasm.bas
fbc $(FBCFLAGS) -m xiasm -o xiasm.o -c xiasm.bas
mkdisk.o: mkdisk.bas
fbc $(FBCFLAGS) -m mkdisk -o mkdisk.o -c mkdisk.bas
ilxi: $(VM_OBJS)
fbc $(FBCFLAGS) -x ilxi $(VM_OBJS)
help.o: help.bas
fbc $(FBCFLAGS) -o help.o -c help.bas
disk.o: disk.bas
fbc $(FBCFLAGS) -o disk.o -c disk.bas
profile.o: profile.bas
fbc $(FBCFLAGS) -o profile.o -c profile.bas
config.o: config.bas
fbc $(FBCFLAGS) -o config.o -c config.bas
asm.o: asm.bas
fbc $(FBCFLAGS) -o asm.o -c asm.bas
signal.o: signal.bas
fbc $(FBCFLAGS) -o signal.o -c signal.bas
bus.o: bus.bas
fbc $(FBCFLAGS) -o bus.o -c bus.bas
console.o: console.bas
fbc $(FBCFLAGS) -o console.o -c console.bas
cpu.o: cpu.bas
fbc $(FBCFLAGS) -o cpu.o -c cpu.bas
error.o: error.bas
fbc $(FBCFLAGS) -o error.o -c error.bas
host.o: host.bas
fbc $(FBCFLAGS) -o host.o -c host.bas
storage.o: storage.bas
fbc $(FBCFLAGS) -o storage.o -c storage.bas
lexer.o: lexer.bas
fbc $(FBCFLAGS) -o lexer.o -c lexer.bas
inst.o: inst.bas
fbc $(FBCFLAGS) -o inst.o -c inst.bas
ilxi.o: ilxi.bas
fbc -m ilxi $(FBCFLAGS) -o ilxi.o -c ilxi.bas
util.o: util.bas
fbc $(FBCFLAGS) -o util.o -c util.bas
message.o: message.bas
fbc $(FBCFLAGS) -o message.o -c message.bas
clean:
rm -f *.o ilxi xiasm *.bin mkdisk *.a
cd src/lib; make clean
cd src/vm; make clean
cd src/util; make clean
cd src/xiasm; make clean
rm -rf dist
rm README
#
# ILXI Virtual Machine
#
# Makefile
#
# Copyright 2016 John P. Willis <jpw@coherent-logic.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
#
#
#
# ILXI Virtual Machine
#
# Makefile (libilxi)
#
# Copyright 2016 John P. Willis <jpw@coherent-logic.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
#
#
OBJS = asm.o cpu.o error.o host.o storage.o lexer.o inst.o util.o bus.o console.o signal.o message.o profile.o config.o disk.o help.o
FBCFLAGS = -g -mt -i ../include
libilxi.a: $(OBJS)
fbc $(FBCFLAGS) -lib -x libilxi.a $(OBJS)
asm.o: asm.bas
fbc $(FBCFLAGS) -o asm.o -c asm.bas
cpu.o: cpu.bas
fbc $(FBCFLAGS) -o cpu.o -c cpu.bas
error.o: error.bas
fbc $(FBCFLAGS) -o error.o -c error.bas
host.o: host.bas
fbc $(FBCFLAGS) -o host.o -c host.bas
storage.o: storage.bas
fbc $(FBCFLAGS) -o storage.o -c storage.bas
lexer.o: lexer.bas
fbc $(FBCFLAGS) -o lexer.o -c lexer.bas
inst.o: inst.bas
fbc $(FBCFLAGS) -o inst.o -c inst.bas
util.o: util.bas
fbc $(FBCFLAGS) -o util.o -c util.bas
bus.o: bus.bas
fbc $(FBCFLAGS) -o bus.o -c bus.bas
console.o: console.bas
fbc $(FBCFLAGS) -o console.o -c console.bas
signal.o: signal.bas
fbc $(FBCFLAGS) -o signal.o -c signal.bas
message.o: message.bas
fbc $(FBCFLAGS) -o message.o -c message.bas
profile.o: profile.bas
fbc $(FBCFLAGS) -o profile.o -c profile.bas
config.o: config.bas
fbc $(FBCFLAGS) -o config.o -c config.bas
disk.o: disk.bas
fbc $(FBCFLAGS) -o disk.o -c disk.bas
help.o: help.bas
fbc $(FBCFLAGS) -o help.o -c help.bas
clean:
rm -f libilxi.a $(OBJS)
#
# ILXI Virtual Machine
#
# Makefile - Utilities (mkdisk etc.)
#
# Copyright 2016 John P. Willis <jpw@coherent-logic.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
#
#
MKDISK_OBJS = mkdisk.o
OBJS = $(MKDISK_OBJS)
FBCFLAGS = -g -mt -i ../include -p ../lib
EXE = mkdisk
all: $(EXE)
mkdisk: $(MKDISK_OBJS)
fbc $(FBCFLAGS) -l ilxi -x mkdisk $(MKDISK_OBJS)
mkdisk.o: mkdisk.bas
fbc $(FBCFLAGS) -m mkdisk -o mkdisk.o -c mkdisk.bas
clean:
rm -f $(EXE) $(OBJS)
#
# ILXI Virtual Machine
#
# Makefile (ilxi)
#
# Copyright 2016 John P. Willis <jpw@coherent-logic.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
#
#
OBJS = ilxi.o
FBCFLAGS = -g -mt -i ../include -p ../lib
ilxi: $(OBJS)
fbc $(FBCFLAGS) -l ilxi -x ilxi $(OBJS)
ilxi.o: ilxi.bas
fbc $(FBCFLAGS) -m ilxi -o ilxi.o -c ilxi.bas
clean:
rm -f ilxi $(OBJS)
#
# ILXI Virtual Machine
#
# Makefile (xiasm)
#
# Copyright 2016 John P. Willis <jpw@coherent-logic.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
#
#
OBJS = xiasm.o
FBCFLAGS = -g -mt -i ../include -p ../lib
xiasm: $(OBJS)
fbc $(FBCFLAGS) -l ilxi -x xiasm $(OBJS)
xiasm.o: xiasm.bas
fbc $(FBCFLAGS) -m xiasm -o xiasm.o -c xiasm.bas
clean:
rm -f xiasm $(OBJS)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment