Blame | Last modification | View Log | RSS feed
#..# Copyright (C) 1999-2000 ERG Limited, All rights reserved## Module name: Makelib.pl# Module type: Makefile system## Description: SH## Version Who Date Description# 1.0 APY 24/08/99 Created## $Source: /cvsroot/device/DEVL/UTILS/SH/MAKEFILE.PL,v $# $Revision: 1.1 $ $Date: 2002/08/02 06:49:31 $ $State: Exp $# $Author: adamy $ $Locker: $#...........................................................................# exec build system#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 SubDir('SUBDIR1', 'SUBDIR2');#..#(none)# build platform definitions ..# eg Platform('P386', 'M68K');#..Platform('DOS16', 'DOS32');#.............................................................................# Platforms definitions## Build flags and paths:# eg AddCFlags( '*', '-DDOSOMETIME' );# AddIncDir( '*', '../INC' );# AddSrcDir( '*', 'SUBDIR' );#..AddIncDir( '*', 'INCLUDE' );AddCFlags( '*', '-DOS_TYPE=OS_DOS' );# Any new source types# eg AddSourceType( '.xxx', '.asm' );#..#(none)# Any source/headers etc# eg Src( '*', 'Makefile.pl' [, ...] )#..Src( '*', 'sh1.c' );Src( '*', 'sh2.c' );Src( '*', 'sh3.c' );Src( '*', 'sh4.c' );Src( '*', 'sh5.c' );Src( '*', 'sh6.c' );Src( '*', 'sh7.c' );Src( '*', 'sh8.c' );Src( '*', 'sh9.c' );Src( '*', 'sh10.c' );Src( '*', 'sh11.c' );Src( '*', 'sh12.c' );Src( '*', 'sh13.c' );Src( '*', 'glob.c' );Src( '*', 'system.c' );# Files to be generated:# eg Generate( 'P386', 'aa.cc', 'aa.h' );#..#(none)# Addition rules:# eg Rule( 'P386', "aa.h:\n" . "\tbuild aa.h" );#..#(none)# Headers to be installed# eg InstallHdr( '*', 'public.h' );#..#(none)# Libraries to be made# eg Lib( 'P386,M68K', 'lib', 'src1', 'src2', '-args' );# Lib( '*', 'lib', @OBJS );#..#(none)# Libraries to be installed into the 'export' lib directory:# eg InstallLib( 'P386', 'lib' );#..#(none)# Applications to be built# eg Prog( ... )#..Prog( 'DOS16', 'sh16', @OBJS, '--Stack=32k', '-llibdos' );Prog( 'DOS32', 'sh32', @OBJS, '--Stack=100k', '-llibdos' );# Applications to be installed# eg InstallProg( ... )#..#(none)# Packaging installation#..#(none)#.............................................................................# Finally generate the makefile#..MakefileGenerate();