Rev 6177 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
# Copyright (C) 1998-2004 ERG Limited, All rights reserved## Module name : Makefile.pl# Module type : Makefile system# Compiler(s) : ANSI C# Environment(s): n/a## Description: makefile.pl template example##.........................................................................#die "Usage: Makefile.pl rootdir Makelib.pl\n"unless( $#ARGV+1 >= 2 );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 libraryLib ( '*' , "MyPackage", @OBJS );InstallLib ( '*' , "MyPackage" );InstallHdr ( '*' , @CHDRS ,"--Strip" );#.............................................................................# Packaging definitions#PackageHdr ( '*', @CHDRS ,"--Strip" );PackageLib ( '*', @LIBS );#..#PackageFile ( '*' , 'descpkg' );#.............................................................................# Finally generate the makefile#MakefileGenerate();#.. Successful termination1;