2 include ../../config/Makefile.top
5 MOL = $(CONFIG_MOL:y=mol)
6 BRIQ = $(CONFIG_BRIQ:y=briq)
7 XTARGETS = $(MOL) $(BRIQ) ppc mollink
8 DICTIONARIES = $(MOL) $(BRIQ)
10 INCLUDES = -I../../kernel -I../../kernel/include \
11 -I../../include/molasm -I$(ODIR)/include
13 #############################################################################
15 mol-OBJS = mol/init.o mol/main.o mol/mol.o mol/console.o mol/osi-blk.o \
16 mol/osi-scsi.o mol/pseudodisk.o mol/methods.o ofmem.o \
17 mol/video.o mol/prom.o mol/tree.o misc.o mol/kernel.o
19 briq-OBJS = briq/init.o briq/main.o briq/briq.o briq/vfd.o \
20 ofmem.o briq/methods.o briq/tree.o \
23 ppc-OBJS = $(KOBJS) $(MODULE_LIBS) \
24 $(FS_LIBS) $(DRIVER_LIBS) $(LIBC_LIBS)
26 all-$(CONFIG_MOL) += $(ODIR)/mol.image
27 all-$(CONFIG_BRIQ) += $(ODIR)/briq.image
28 all-$(CONFIG_MPC107) += $(ODIR)/mpc107.image
31 #############################################################################
33 mol-SRC = ppc.fs tree.fs mol.fs $(ARCHDICT_SRC)
34 briq-SRC = ppc.fs briq/tree.fs briq/briq.fs $(ARCHDICT_SRC)
36 $(ODIR)/mol/kernel.o: $(ODIR)/include/mol-dict.h
37 $(ODIR)/briq/kernel.o: $(ODIR)/include/briq-dict.h
39 $(ODIR)/include/mol-dict.h: $(ODIR)/mol.dict
40 test -d $(dir $@) || $(INSTALL) -d $(dir $@)
41 @echo "static const char forth_dictionary[] = {" > $@
42 @cat $< | hexdump -ve '1/0 "\t" 8/1 "0x%02x, " 1/0 "\n"' \
43 | sed 's/0x ,//g' >> $@
46 $(ODIR)/include/briq-dict.h: $(ODIR)/briq.dict
47 test -d $(dir $@) || $(INSTALL) -d $(dir $@)
48 @echo "static const char forth_dictionary[] = {" > $@
49 @cat $< | hexdump -ve '1/0 "\t" 8/1 "0x%02x, " 1/0 "\n"' \
50 | sed 's/0x ,//g' >> $@
53 #############################################################################
55 $(ODIR)/mol.image: $(ODIR)/start.o $(ODIR)/libmol.a $(ODIR)/libppc.a
56 @printf "= Building %-22s : " $@
58 $(LD) -Ttext=0x01e01000 -Bstatic $^ $(LIBGCC) -o $@
59 @nm $@ | sort > $(ODIR)/mol.syms
63 $(ODIR)/briq.image: $(ODIR)/start.o $(ODIR)/timebase.o $(ODIR)/libbriq.a $(ODIR)/libppc.a
64 @printf "= Building %-22s : " $@
66 $(LD) -g -Ttext=0x01e01000 -Bstatic $^ $(LIBGCC) -o $@
67 @nm $@ | sort > $(ODIR)/briq.syms
72 @echo "BUILDING mpc107.image (not yet implemented)"
75 $(RM) $(ODIR)/*.image $(ODIR)/*.syms $(ODIR)/include/mol-dict.h
78 include $(rules)/Rules.make
79 include $(rules)/Rules.forth