##
##    OBPP (ObtainBestPenPatch)
##
##        © 1996 by Timo C. Nentwig
##        All Rights Reserved !
##
##        Tcn@oxygen.in-berlin.de
##
##

#    _______________________________________________________
#    Directories/Names

BIN             =   OBPP            # Binary
INC             =   include         # Includes
OBJ             =   /objects        # Objects

#    _______________________________________________________
#    Constants

GST             =   GST=$(INC)/GST.gst

#    _______________________________________________________
#    Settings/Compiling/Linking

OBJS            =   $(OBJ)/Cx.o         \
                    $(OBJ)/Main.o       \
                    $(OBJ)/Patch.o      \
                    $(OBJ)/Settings.o

all:                $(INC)/GST.gst /$(BIN)

/$(BIN):            $(OBJS)
                    SC LINK TO /$(BIN) WITH <<
                    $(OBJS)
                    <

#    _______________________________________________________
#    Source(s)

$(OBJ)/Cx.o:        Cx.c        $(INC)/GST.h
$(OBJ)/Main.o:      Main.c      $(INC)/GST.h
$(OBJ)/Patch.o:     Patch.c     $(INC)/GST.h
$(OBJ)/Settings.o:  Settings.c  $(INC)/GST.h

$(INC)/GST.gst:     $(INC)/GST.h
                    GST $@ UNLOAD
                    SC $(C_FLAGS) NOOBJNAME MAKEGST=$@ $(INC)/GST.h
                    GST $@

#    _______________________________________________________
#    Routines

proto:
                    @- delete $(INC)/Protos.h >NIL:
                    @  echo noline "[2m    Making protos ... "
                    @  src:c/tcn/MakePROTO/MakePROTO F *.c PK proto DT CPP >>$(INC)/Protos.h
                    @  echo "DONE[0m"

bak:
                    @  /misc/backup.dos
