# COPYRIGHT - VIX IP PTY LTD ("VIX"). ALL RIGHTS RESERVED.
#
# Module name   : Makefile.pl
# Module type   : Makefile system
# Environment(s): JATS
#
# Description:    makefile.pl template example
#
#.........................................................................#

require "$ARGV[1]";

# subdirectories to recurse (if any) and target platform(s),
#    the following section(s) is called for each target ..
#
# eg.   Rules();
#   SubDir('SubDir1', 'SubDir2');
#   Platform( 'WIN32', 'MOS68K', 'MOSCF' );

#
# Build platform definitions ..
#
Platform( '*' );

#
# Specify directories to search to locate source and header files
#
AddDir     ( '*', "$ProjectBase/common" );
AddIncDir  ( '*', "$ProjectBase/include" );

############################################################################
#   Define the source files
#
AddSrcDir  ( '*'    , "src" );
AddDir     ( '*'    , "inc" );
Src        ( '*'    , "source1.c" );
Src        ( '*'    , "source2.c" );
Src        ( 'WIN'  , "win_source.c" );
Src        ( 'MOS'  , "mos_source.c" );
Src        ( '*',     "MyApi.h" );

#
#   Build and install the library
Lib        ( '*'    , "MyPackage", @OBJS  );
InstallLib ( '*'    , "MyPackage" );
InstallHdr ( '*'    , @CHDRS ,"--Strip" );


#.............................................................................
# Packaging definitions
#

PackageHdr  ( '*', @CHDRS ,"--Strip" );
PackageLib  ( '*', @LIBS );

#..
#
PackageFile ( '*'   , 'descpkg' );

#.............................................................................
# Finally generate the makefile
#
MakefileGenerate();

#..  Successful termination
1;

