###########################################################################
#
# File     : Makefile
#
# Abstract : Command line makefile used to build a RenderWare demo program.
#            This is a GNU Make makefile. A copy of GNU Make is required in
#            order to use this file.
#
###########################################################################
#
# This file is a product of Criterion Software Ltd.
#
# This file is provided as is with no warranties of any kind and is
# provided without any obligation on Criterion Software Ltd. or Canon Inc.
# to assist in its use or modification.
#
# Criterion Software Ltd. will not, under any circumstances, be liable for
# any lost revenue or other damages arising from the use of this file.
#
# Copyright (c) 2000, 2001 Criterion Software Ltd.
# All Rights Reserved.
#
# RenderWare is a trademark of Canon Inc.
#
###########################################################################

# Define the projects to be built

DEMO = ppvu

# include common makefile options

include ../../makeopt

CSRC =  $(SRC)/main.c           \
        $(SRC)/cfx.c            \
        $(SRC)/$(RWOS)/events.c \
        $(COMMON)/menu.c        \
        $(COMMON)/camera.c

CSRC += \
        $(SRC)/skycfx/skycfx.c

DSMS =						\
        $(SRC)/skycfx/cfxNT.dsm                      \
        $(SRC)/skycfx/cfxPRS.dsm                      \
        $(SRC)/skycfx/cfxPRL.dsm                      \

OBJ +=	$(patsubst %.dsm,$(OBJDIR)/%.$(O),$(notdir $(DSMS)))

DVPASFLAGS += -I$(SRC)/skycfx/

$(OBJDIR)/%.$(O): $(SRC)/skycfx/%.dsm
	$(DVPASM) $(DVPASFLAGS) \
	-alhs $(DVPAOUT)$@ $^ > $(OBJDIR)/$*.lsd

$(OBJDIR)/%.$(O): $(SRC)/skycfx/%.c
	$(CC) $(CFLAGS) $(COUT)$@ $^


# Add skeleton files

CSRC += $(SKEL)/skeleton.c	\
	$(SKELPS)/$(RWOS).c     \
	$(SKELSRC)

ifeq ($(RWMETRICS), 1)
CSRC += $(SKEL)/vecfont.c   \
        $(SKEL)/metrics.c
endif

RWLIBS += $(RWLIBDIR)/$(LP)rtcharse.$(L) \
        $(RWLIBDIR)/$(LP)rtbmp.$(L)      \
        $(RWLIBDIR)/$(LP)rtpng.$(L)      \
        $(RWLIBDIR)/$(LP)rpworld.$(L)    \
	$(RWLIBDIR)/$(LP)rwcore.$(L)

include ../../maketarg

CFLAGS +=                                       \
        -I$(SRC)/skycfx



