1 package MakeProjectCreator
;
3 # ************************************************************
4 # Description : A Generic Make Project Creator
5 # Author : Chad Elliott
6 # Create Date : 2/18/2003
7 # ************************************************************
9 # ************************************************************
11 # ************************************************************
19 @ISA = qw(MakeProjectBase ProjectCreator);
21 # ************************************************************
23 # ************************************************************
25 ## NOTE: We call the constant as a function to support Perl 5.6.
26 my %info = (Creator
::cplusplus
() => {'dllexe' => 'makeexe',
30 Creator
::csharp
() => {'dllexe' => 'make.net',
32 'template' => 'make.net',
34 Creator
::java
() => {'dllexe' => 'makeexe',
38 Creator
::vb
() => {'dllexe' => 'make.net',
40 'template' => 'make.net',
44 # ************************************************************
46 # ************************************************************
48 sub languageSupported
{
49 return defined $info{$_[0]->get_language()};
59 sub get_dll_exe_template_input_file
{
60 return $info{$_[0]->get_language()}->{'dllexe'};
64 sub get_dll_template_input_file
{
65 return $info{$_[0]->get_language()}->{'dll'};
70 return $info{$_[0]->get_language()}->{'template'};
74 my($self, $name) = @_;
76 if ($name eq 'compilers') {
77 ## The default compilers template variable value is determined by the
78 ## language and directly corresponds to a group of settings in the
79 ## .mpt file (make.net.mpt for csharp and makedll.mpt for all
81 my $language = $self->get_language();
82 if ($language eq Creator
::java
) {
85 elsif ($language eq Creator
::csharp
) {
92 elsif ($name eq 'language') {
93 ## Allow the language to be available to the template. Certain
94 ## things are not used in make.mpd when the language is java.
95 return $self->get_language();
97 elsif ($name eq 'main') {
98 ## The main is needed when generating the makefiles for use with gcj.
99 my @sources = $self->get_component_list('source_files', 1);
100 my $exename = $self->find_main_file(\
@sources);
101 return $exename if (defined $exename);