#
#	Layers subsystem makefile (generated from 12/26/90 template)
#

#	Remove '#' from next line for "silent" operation
#!CMDSWITCHES +s

#	Temporary files
T1	= $(TMP)\caz1.tmp
T2	= $(TMP)\caz2.tmp
T3	= $(TMP)\caz3.tmp

#	Path to WGA Tools Project
W	= $(WGA)

#	Path to Layers Project Directory
L	= $(LAYERS)

#	Path to directory holding make stuff
M	= $L\makestuf

#	Path to directory holding forms preprocessor
FPP	= $L\bin\formpp.exe

#	Path to Local project
Z	= $(BANDIT)

#	Sibling-invariant name of this directory
H	= $Z\src\schdist


#	Location of the Layers Source Include directory
I	= $L\inc

#	Layrport
J	=$Z\src\layrport

#	Location of the Calendar Source Include directory
X	= $Z\inc

#	Location of the Demilayr directory
D	= $L\src\demilayr

#	Location of resources directory
!IF "$(RESOURCE)" == ""
R	= $Z\src\usa
!ELSE
R	= $(RESOURCE)
!ENDIF

#	Files on which every file of a given type depends.
#	Add others as appropriate, for instance, add $I\framewrk.hxx
#	if the Framework is used.
INCLS	= $J\slingsho.h $J\demilayr.h $H\schd\schnames.h $H\schd\schmail.h strings.h
AINCLS	= $I\slingsho.inc $I\debug.inc
INCLSXX	= $I\slingsho.h $I\demilayr.h
INCLSDES= forms.map $(FPP)

#	Pseudo target files for .hxx and .frm files.  Generated from .des
DES_XXX	=

goal:	external


#	Ensure version is defined
!IF "$(VERSION)" == ""
VERSION	= WINDOWS
!ENDIF

#	Ensure DLL is defined (default value 0)
!IF "$(DLL)" == ""
DLL	= 0
!ENDIF

#	Ensure DLLXDEFS is not defined if not a DLL
!IF "$(DLL)" == "0"
!IF	"$(DLLXDEFS)" != ""
DLLXDEFS=
!ENDIF
!ENDIF

#	Compiler and assembler flags

!IF "$(VERSION)" == "WINDOWS"
DEFS	= -DDEBUG -DMINTEST -DSCHED_DIST_PROG -DDUMP_LOG
CFLAGS  = -c -AL -Od -Z7p -G2d -W3 -J -Gz -Zel -H64 -G4 -I. -I.. -I..\..\layrport
AFLAGS	= -Mx -Z -Zi -L -t
!ENDIF
!IF "$(VERSION)" == "WINDOWS_SHIP"
DEFS	= -DMINTEST -DSCHED_DIST_PROG -DDUMP_LOG
CFLAGS  = -c -AL -Owx -Zp -G2sd -W3 -J -Gz -Zel -H64 -G4 -I. -I.. -I..\..\layrport
AFLAGS	= -Mx -t
!ENDIF
!IF "$(VERSION)" == "WINDOWS_TEST"
DEFS	= -DMINTEST -DSCHED_DIST_PROG -DDUMP_LOG
CFLAGS  = -c -AL -Owx -Z7p -G2sd -W3 -J -Gz -Zel -H64 -G4 -I. -I.. -I..\..\layrport
AFLAGS	= -Mx -Zi -t
!ENDIF


OBJS0	= coreport.obj mailport.obj mystr.obj  names.obj

!IF "$(DLL)" != "0"
OBJSDLL	= strings.obj
!ENDIF

#####

.SUFFIXES: .h .c .asm .obj .exe .cxx .res .rc .bas .des

{$H}.c.obj:
	echo +++++++++
	echo COMPILING $*.c
		cc $(CFLAGS) $(DEFS) $H\$*.c


{$H}.asm.obj:
   echo +++++++++
   echo ASSEMBLING $*.asm
		masm $(AFLAGS) $(DEFS) $H\$*.asm;



##### Put subsystem-specific make rules here #####

strings.obj: $D\strings.c strings.h strings.sr $(INCLS)
	echo +++++++++
	echo COMPILING $*.c
		cc $(CFLAGS) $(DEFS) $D\$*.c



##### EXTERNAL #####

objs.ext: $H\makefile
	echo ++++++++++
	echo BUILDING $@
		-del objs.ext
		echo $(OBJS0)					>> objs.ext
!IF "$(DLL)" != "0"
		echo $(OBJSDLL)					>> objs.ext
!ENDIF


external: \
		$(DES_XXX) $(OBJS0) \
!IF "$(DLL)" != "0"
		$(OBJSDLL) \
!ENDIF

			echo +++ MADE EXTERNAL $(VERSION) schdist



##### Dependencies #####

#	WARNING!!! These dependencies are obviously not complete.  
#	They need to filled in by the developer.

coreport.obj: $H\coreport.c $(INCLS) $H\coreport.h 
mailport.obj: $H\mailport.c $(INCLS)
mystr.obj: $H\mystr.c strings.h strings.sr $(INCLS)
names.obj: $H\names.c $(INCLS) $H\server_.h
