###############################################
#
#  WMake Makefile for TTT (Tic-tac-Toe)
#
# (C) Copyright 1992 by GO Corporation, All Rights Reserved.
#
# You may use this Sample Code any way you please provided you 
# do not resell the code and that this notice (including the above 
# copyright notice) is reproduced on all copies.  THIS SAMPLE CODE 
# IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, AND GO CORPORATION 
# EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES, INCLUDING BUT NOT 
# LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
# PARTICULAR PURPOSE. IN NO EVENT WILL GO CORPORATION BE LIABLE TO YOU 
# FOR ANY CONSEQUENTIAL,INCIDENTAL,OR INDIRECT DAMAGES ARISING OUT OF 
# THE USE OR INABILITY TO USE THIS SAMPLE CODE.
#
# $Revision:   1.13  $
#	$Author:   kcatlin  $
#	  $Date:   11 Mar 1992 18:42:06  $
#
###############################################

# Set PENPOINT_PATH to your environment variable, if it exists.
# Otherwise, set it to \penpoint
!ifdef %PENPOINT_PATH
PENPOINT_PATH = $(%PENPOINT_PATH)
!else
PENPOINT_PATH = \penpoint
!endif

MODE = debug

#  The DOS name of your project directory.
PROJ = ttt

#  Standard defines for sample code
!INCLUDE $(PENPOINT_PATH)\sdk\sample\sdefines.mif

#  The PenPoint name of your application
EXE_NAME = Tic-Tac-Toe

#  The linker name for your executable : company-name-V<major>(<minor>)
EXE_LNAME	= GO-TIC_TAC_TOE-V1(1)

#  The app's version (if undefined, srules.mif defines it to be 1.0)
APP_VERSION = 1.1

#  Object files needed to build your app
EXE_OBJS =	methods.obj &
			tttapp.obj &
			tttdata.obj &
			tttview.obj &
			tttvopt.obj &
			tttdbg.obj &
			tttmbar.obj &
			tttutil.obj &
			tttvxfer.obj &
			s_ttt.obj

#  Libs needed to build your app
EXE_LIBS = penpoint app win input xfer xtemplt

#  The .res files for your project; typically these will be bitmap resources
#  and/or compiled resource compiler files.  If you have resources, add 
#  $(APP_DIR)\app.res to the "all" target.
RES_FILES = lgicon.res smicon.res tttqhelp.res tttmisc.res

#  Targets

all: $(APP_DIR)\$(PROJ).exe $(APP_DIR)\app.res .SYMBOLIC

#  Install the help files. Note that you should copy the help files
#    in the reverse order from how you want them to appear in the help
#    notebook.
help :: .SYMBOLIC
 mkdir $(PENPOINT_PATH)\app\ttt\help
 mkdir $(PENPOINT_PATH)\app\ttt\help\ttthelp2
 copy strat.txt $(PENPOINT_PATH)\app\ttt\help\ttthelp2\help.txt
 mkdir $(PENPOINT_PATH)\app\ttt\help\ttthelp1
 copy rules.txt $(PENPOINT_PATH)\app\ttt\help\ttthelp1\help.txt
 -$(STAMP) $(PENPOINT_PATH)\app\ttt\help /g "Tic-Tac-Toe Rules" /d ttthelp1
 -$(STAMP) $(PENPOINT_PATH)\app\ttt\help /g "Tic-Tac-Toe Strategy" /d ttthelp2

#  Install the stationery files. Each stationery file must be in a separate
#	 directory off of statnry. Here, we also stamp the stationery directories
#	 with meaningful names. Note that the "filled" stationery directory is also
#	 stamped with attributes so that it appears in the "Create" menu.
stationery :: .SYMBOLIC
 mkdir $(PENPOINT_PATH)\app\ttt\statnry
 mkdir $(PENPOINT_PATH)\app\ttt\statnry\tttstat1
 copy filled.txt $(PENPOINT_PATH)\app\ttt\statnry\tttstat1\tttstuff.txt
 mkdir $(PENPOINT_PATH)\app\ttt\statnry\tttstat2
 copy xsonly.txt $(PENPOINT_PATH)\app\ttt\statnry\tttstat2\tttstuff.txt
 -$(STAMP) $(PENPOINT_PATH)\app\ttt\statnry /g "Tic-Tac-Toe (filled)" /d tttstat1 /a 00800274 1
 -$(STAMP) $(PENPOINT_PATH)\app\ttt\statnry /g "Tic-Tac-Toe (X's)" /d tttstat2

#  The clean rule must be :: because it is also defined in srules
clean :: .SYMBOLIC
 -del methods.h
 -del $(APP_DIR)\help\help1\*.*
 -del $(APP_DIR)\help\help2\*.*
 -del $(APP_DIR)\help\*.*
 -rmdir $(APP_DIR)\help\help1
 -rmdir $(APP_DIR)\help\help2
 -rmdir $(APP_DIR)\help
 -del $(APP_DIR)\statnry\stat1\*.*
 -del $(APP_DIR)\statnry\stat2\*.*
 -del $(APP_DIR)\statnry\*.*
 -rmdir $(APP_DIR)\statnry\stat1
 -rmdir $(APP_DIR)\statnry\stat2
 -rmdir $(APP_DIR)\statnry

#  Dependencies
methods.obj: methods.tbl tttpriv.h tttdata.h tttview.h tttapp.h

tttapp.obj: methods.h tttapp.c tttview.h tttapp.h tttdata.h tttpriv.h

tttdata.obj: methods.h tttdata.c tttdata.h tttpriv.h

tttview.obj: methods.h tttview.c tttdata.h tttview.h tttpriv.h

tttvopt.obj: tttvopt.c tttview.h

tttdbg.obj: tttdbg.c tttpriv.h tttdata.h

tttmbar.obj: tttmbar.c tttpriv.h tttapp.h

tttvxfer.obj: tttvxfer.c tttview.h tttdata.h

#  Standard rules for sample code
!INCLUDE $(PENPOINT_PATH)\sdk\sample\srules.mif

