# Makefile for the release of CWimp to ISVs, version 0.1
# For use with PMM (Poor man's make)
# Compiles/assembles all the files, but doesn't build a library
# You will need the C compiler (cc) and the assembler (objasm)
# Assumes you are in the directory containing the c, h, s and o directories
# and that the C standard header are in $.arm.clib.h

all: o.bbc  \
     o.flex \
     o.font \
     o.os   \
     o.poll \
     o.sprite \
     o.swi    \
     o.trace  \
     o.werr   \
     o.wimp   \
     o.wimpt

o.bbc:    c.bbc \
          $.arm.clib.h.stdarg \
          h.os                \
          h.bbc
          cc -c bbc

o.flex:   c.flex \
          $.arm.clib.h.stdlib \
          $.arm.clib.h.stdarg \
          $.arm.clib.h.string \
          $.arm.clib.h.stdio  \
          h.os                \
          h.werr              \
          h.flex              \
          h.trace             \
          h.wimp              \
          h.wimpt
          cc -c flex

o.font:   c.font \
          h.os   \
          h.font
          cc -c font

o.os:     c.os \
          h.os \
          h.swi
          cc -c os

o.poll:   s.poll
          objasm s.poll o.poll -stamp -quit

o.sprite: c.sprite \
          $.arm.clib.h.stddef \
          h.os                \
          h.sprite
          cc -c sprite

o.swi:    s.swi
          objasm s.swi o.swi -stamp -quit
o.trace:  c.trace \
          $.arm.clib.h.string \
          $.arm.clib.h.stdarg \
          $.arm.clib.h.stdio  \
          h.os                \
          h.bbc               \
          h.wimp              \
          h.wimpt             \
          h.trace
          cc -c trace

o.werr:   c.werr \
          $.arm.clib.h.stdarg \
          $.arm.clib.h.stdlib \
          $.arm.clib.h.stdio  \
          $.arm.clib.h.string \
          h.os                \
          h.wimp              \
          h.werr              \
          h.wimpt
          cc -c werr

o.wimp:   c.wimp \
          h.os   \
          h.wimp
          cc -c wimp

o.wimpt:  c.wimpt \
          $.arm.clib.h.stdarg \
          $.arm.clib.h.stdlib \
          $.arm.clib.h.stdio  \
          $.arm.clib.h.signal \
          h.os                \
          h.bbc               \
          h.wimp              \
          h.wimpt             \
          h.trace             \
          h.werr
          cc -c wimpt
