#!/usr/bin/env riscos-amu -f
# Makefile for LanMan98
#

#
# Program specific options:
#
COMPONENT  = LanMan98

# Specifies additional targets for startup
ifeq (${MAKECMDGOALS},install)
INITTARGET = inittarget
endif

# Specifies additional targets for clean
CLEANTARGET = cleantarget

# The file to output (defaults ${COMPONENT})
#TARGET = <filename>

# Comma-separated list of paths to use for includes, such as:
#   <Lib$Dir>.LibName.
INCLUDES   =

# Space separated list of defines to set, eg -DDEBUG
CDEFINES   =

# Space separated list of libraries to link against.
LIBS       = C:LanMan98PGLib.o.libLanMan98PGLib

# Resources to include in the application, prefixed by ${APPDIR}:
#   ${APPDIR}.Resources.MyFile
RESOURCES = ${APPDIR}.Mappings \
            ${APPDIR}.5Sprites \
            ${APPDIR}.5Sprites22 \
            ${APPDIR}.LICENCE \
            ${APPDIR}.LanMan98 \
            ${APPDIR}.!TLSManager.!Boot \
            ${APPDIR}.!TLSManager.!Run \
            ${APPDIR}.!TLSManager.!Help \
            ${APPDIR}.!TLSManager.!Sprites \
            ${APPDIR}.!TLSManager.!Sprites22 \
            ${APPDIR}.!TLSManager.LICENCE \
            ${APPDIR}.!TLSManager.TLSManager \
            ${APPDIR}.!TLSManager.OpenSSL.cacert \
            ${APPDIR}.!TLSManager.OpenSSL.OpenSSL-LICENCE \
            ${APPDIR}.!TLSManager.OpenSSL.ACKNOWLEDGEMENTS \
            ${APPDIR}.!TLSManager.OpenSSL.SOURCE \

# Objects to build, using the format o.<name> (will be varied for build type)
OBJS       = o.filer98 \
             o.lm98enum \


include CApp


ifeq (${MAKECMDGOALS},install)
inittarget:
        ${MKDIR} $(INSTDIR)
        ${MKDIR} $(APPDIR)
        ${MKDIR} $(APPDIR).Discs
        ${MKDIR} $(APPDIR).!TLSManager
        ${MKDIR} $(APPDIR).!TLSManager.OpenSSL
endif

cleantarget:
        ${DESTROY} ${APPDIR}.Mappings \
                   ${APPDIR}.5Sprites \
                   ${APPDIR}.5Sprites22 \
                   ${APPDIR}.LICENCE \
                   ${APPDIR}.LanMan98 \
                   ${APPDIR}.!TLSManager \

# Installation of any resources into the application:
#   ${RDIR} is the Resources directory
#   ${LDIR} is the locale specified directory (eg Resources.UK)
$(APPDIR).Mappings: $(RDIR).Mappings
        $(CP) $(RDIR).Mappings $(APPDIR).Mappings $(CPFLAGS)
$(APPDIR).5Sprites: $(RDIR).5Sprites
        $(CP) $(RDIR).5Sprites $(APPDIR).5Sprites $(CPFLAGS)
$(APPDIR).5Sprites22: $(RDIR).5Sprites22
        $(CP) $(RDIR).5Sprites22 $(APPDIR).5Sprites22 $(CPFLAGS)
$(APPDIR).LICENCE: $(LDIR).LICENCE
        $(CP) $(LDIR).LICENCE $(APPDIR).LICENCE $(CPFLAGS)

$(APPDIR).LanMan98: <Install$Dir>.LanMan98
        $(CP) "<Install$Dir>.LanMan98" $(APPDIR).LanMan98 $(CPFLAGS)

$(APPDIR).!TLSManager.!Boot: ^.TLSManager.Resources.!Boot
        $(CP) ^.TLSManager.Resources.!Boot $@ $(CPFLAGS)
$(APPDIR).!TLSManager.!Run: ^.TLSManager.Resources.!Run
        $(CP) ^.TLSManager.Resources.!Run $@ $(CPFLAGS)
$(APPDIR).!TLSManager.!Help: ^.TLSManager.Resources.!Help
        $(CP) ^.TLSManager.Resources.!Help $@ $(CPFLAGS)
$(APPDIR).!TLSManager.!Sprites: ^.TLSManager.Resources.!Sprites
        $(CP) ^.TLSManager.Resources.!Sprites $@ $(CPFLAGS)
$(APPDIR).!TLSManager.!Sprites22: ^.TLSManager.Resources.!Sprites22
        $(CP) ^.TLSManager.Resources.!Sprites22 $@ $(CPFLAGS)
$(APPDIR).!TLSManager.LICENCE: ^.TLSManager.Resources.LICENCE
        $(CP) ^.TLSManager.Resources.LICENCE $@ $(CPFLAGS)
$(APPDIR).!TLSManager.TLSManager: ^.TLSManager.rm.TLSManager
        $(CP) ^.TLSManager.rm.TLSManager $@ $(CPFLAGS)
$(APPDIR).!TLSManager.OpenSSL.cacert: ^.TLSManager.Resources.OpenSSL.cacert
        $(CP) ^.TLSManager.Resources.OpenSSL.cacert $@ $(CPFLAGS)
$(APPDIR).!TLSManager.OpenSSL.OpenSSL-LICENCE: ^.TLSManager.Resources.OpenSSL.OpenSSL-LICENCE
        $(CP) ^.TLSManager.Resources.OpenSSL.OpenSSL-LICENCE $@ $(CPFLAGS)
$(APPDIR).!TLSManager.OpenSSL.ACKNOWLEDGEMENTS: ^.TLSManager.Resources.OpenSSL.ACKNOWLEDGEMENTS
        $(CP) ^.TLSManager.Resources.OpenSSL.ACKNOWLEDGEMENTS $@ $(CPFLAGS)
$(APPDIR).!TLSManager.OpenSSL.SOURCE: ^.TLSManager.Resources.OpenSSL.SOURCE
        $(CP) ^.TLSManager.Resources.OpenSSL.SOURCE $@ $(CPFLAGS)

#---------------------------------------------------------------------------
# Dynamic dependencies:
