# !ResEd master Makefile

# Pass INSTDIR set to the directory into which you wish to install !ResEd eg:
#INSTDIR=$

CPFLAGS = A~C~DF~L~N~P~Q~R~S~T~V

all:
        dir common
        amu CFLAGS="$(CFLAGS)"
        dir ^.shell
        amu CFLAGS="$(CFLAGS)"
        dir ^.CSE.!Menu
        amu CFLAGS="$(CFLAGS)"
        dir ^.!Window
        amu CFLAGS="$(CFLAGS)"
        dir ^.!Misc
        amu CFLAGS="$(CFLAGS)"
        dir ^.^
        @echo *** Build complete

install:
        cdir $(INSTDIR).!ResEd
        cdir $(INSTDIR).!ResEd.CSE
        cdir $(INSTDIR).!ResEd.CSE.!Menu
        cdir $(INSTDIR).!ResEd.CSE.!Window
        cdir $(INSTDIR).!ResEd.CSE.!Misc
        dir shell
        amu CFLAGS="$(CFLAGS)" PROGDIR=$(INSTDIR).!ResEd install
        dir ^.CSE.!Menu
        amu CFLAGS="$(CFLAGS)" PROGDIR=$(INSTDIR).!ResEd.CSE.!Menu install
        dir ^.!Window
        amu CFLAGS="$(CFLAGS)" PROGDIR=$(INSTDIR).!ResEd.CSE.!Window install
        dir ^.!Misc
        amu CFLAGS="$(CFLAGS)" PROGDIR=$(INSTDIR).!ResEd.CSE.!Misc install
        dir ^.^
        @echo *** Installation complete

depend:
        dir common
        amu -f MakeProto depend
        dir ^.shell
        amu -f MakeProto depend
        dir ^.CSE.!Menu
        amu -f MakeProto depend
        dir ^.!Window
        amu -f MakeProto depend
        dir ^.!Misc
        amu -f MakeProto depend
        dir ^.^
        @echo *** Dependencies built

clean:
        dir common
        amu clean
        dir ^.shell
        amu clean
        dir ^.CSE.!Menu
        amu clean
        dir ^.!Window
        amu clean
        dir ^.!Misc
        amu clean
        dir ^.^
        @echo *** Cleaned
