#
#           __ ,
#            ,-| ~           ,               ,,
#           ('||/__,        ||               ||                  _
#          (( |||  | \\ \\ =||=   _-_  \\/\\ ||/|,  _-_  ,._-_  / \\
#          (( |||==| || ||  ||   || \\ || || || || || \\  ||   || ||
#           ( / |  , || ||  ||   ||/   || || || |' ||/    ||   || ||
#            -____/  \\/\\  \\,  \\,/  \\ \\ \\/   \\,/   \\,  \\_-|
#                                                               /  \
#                                                              '----`
#                     Text Output and Font Management System
#                       Microsoft Windows 95/98/NT Version
#
#  Copyright (c) 1995-1999 by Dan Higdon, Tim Little, and Chuck Walbourn
#
#
#
# This file and all associated files are subject to the terms of the
# GNU Lesser General Public License version 2 as published by the
# Free Software Foundation (http://www.gnu.org).   They remain the
# property of the authors: Dan Higdon, Tim Little, and Chuck Walbourn.
# See LICENSE.TXT in the distribution for a copy of this license.
#
# THE AUTHORS MAKE NO WARRANTIES, EXPRESS OR IMPLIED, AS TO THE CORRECTNESS
# OF THIS CODE OR ANY DERIVATIVE WORKS WHICH INCORPORATE IT.  THE AUTHORS
# PROVIDE THE CODE ON AN "AS-IS" BASIS AND EXPLICITLY DISCLAIMS ANY
# LIABILITY, INCLUDING CONSEQUENTIAL AND INCIDENTAL DAMAGES FOR ERRORS,
# OMISSIONS, AND OTHER PROBLEMS IN THE CODE.
#
#
#
#                        http://www.mythos-engine.org/
#
#
#
# Created by Chuck Walbourn
#
# makefile
#
#

#
#
#                               Variables
#
#

!if "$(DEBUG)" == ""
DEBUG = NO
!endif

!if "$(THREAD)" == ""
THREAD = YES
!endif

!if "$(MYTH95ROOT)" == ""
MYTH95ROOT = \MythOS95
!endif

INCPATH = ;..\;..\..\inc;$(MYTH95ROOT)\inc;

#Ŀ
# File specific variables                                                  
#

LIBPATH = $(MYTH95ROOT)\lib;

# String
EXESTR = gstring

OBJSSTR = \
gflexstr.obj\
gstring.obj\
gstringp.obj\
gstring.res

# Font
EXEFNT = gfont

OBJSFNT = \
gflex.obj\
gfont.obj\
gfontbm.obj\
gfontp.obj\
gfonttt.obj\
gfont.res

LIBS =\
xfile.lib\
ivory.lib\
user32.lib\
gdi32.lib

#Ŀ
# First target                                                             
#

all: setstden $(EXEFNT).exe $(EXESTR).exe

#Ŀ
# Standard make include                                                    
#

!include $(MYTH95ROOT)\inc\make.inc

#
#
#                                 Rules
#
#

#--- .c, .cpp, .asm setup in standard include ---

#
#
#                              Dependancies
#
#

#Ŀ
# Misc targets                                                             
#

release: all
    copy *.exe $(MYTH95ROOT)\bin

clean:
    del gflex.c
    del gflexstr.c
    del *.obj
    del *.res
    del *.err
    del *.lst
    del *.ilk
    del *.pdb
    del *.vcp

#Ŀ
# Guttenberg text compiler                                                 
#

$(EXESTR).exe:   $(OBJSSTR)
   $(LINK) $(LINKOPTS) /NODEFAULTLIB:LIBCMTD /OUT:$*.exe @<<
   $(OBJSSTR) $(LIBS)
<<

gflexstr.obj : .\gflexstr.c
        $(CC) $(CCOPTIONS) /W2 gflexstr.c

.\gflexstr.c : ..\gstring.l
   del lex.yy.c
   del gflexstr.c
   flex -8 ../gstring.l
   ren lex.yy.c gflexstr.c

#Ŀ
# Guttenberg font converter                                                
#

$(EXEFNT).exe:   $(OBJSFNT)
   $(LINK) $(LINKOPTS) /NODEFAULTLIB:LIBCMTD /OUT:$*.exe @<<
   $(OBJSFNT) $(LIBS)
<<

gflex.obj : .\gflex.c
        $(CC) $(CCOPTIONS) /W2 gflex.c

.\gflex.c : ..\gfont.l
   del lex.yy.c
   del gflex.c
   flex -8 ../gfont.l
   ren lex.yy.c gflex.c

# End of makefile 

