summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog40
-rw-r--r--config/mfc.mpb3
-rw-r--r--config/openssl.mpb2
-rwxr-xr-xdevtools/document_template.pl5
-rw-r--r--docs/MPC.sgml11
-rw-r--r--docs/README4
-rw-r--r--docs/USAGE5
-rw-r--r--docs/templates/ghs.txt13
-rw-r--r--modules/GHSProjectCreator.pm52
-rw-r--r--modules/GHSWorkspaceCreator.pm78
-rw-r--r--modules/ProjectCreator.pm10
-rw-r--r--modules/TemplateParser.pm46
-rw-r--r--templates/ghs.mpd203
-rw-r--r--templates/ghscommon.mpt2
-rw-r--r--templates/makedll.mpt21
15 files changed, 368 insertions, 127 deletions
diff --git a/ChangeLog b/ChangeLog
index b874dc0b..dd935e48 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,43 @@
+Tue Sep 19 13:04:15 UTC 2006 Chad Elliott <elliott_c@ociweb.com>
+
+ * docs/MPC.sgml:
+ * docs/USAGE:
+ * docs/templates/ghs.txt:
+ * modules/GHSProjectCreator.pm:
+ * modules/GHSWorkspaceCreator.pm:
+ * modules/ProjectCreator.pm:
+ * modules/TemplateParser.pm:
+ * templates/ghs.mpd:
+ * templates/ghscommon.mpt:
+
+ Modified the ghs project type to support the 4.x version of the
+ Multi IDE. With this, the old .bld format has been removed. This
+ version assumes that Multi is being run on Windows. If this is
+ not the case, set the MPC_GHS_UNIX environment variable.
+
+ * config/mfc.mpb:
+
+ Used an else on the subsystem specific section instead of
+ explicitly listing out the later versions of Visual C++. When vc9
+ is released, this file may not need to be modified.
+
+ * config/openssl.mpb:
+
+ Added nmake to the section related to Visual C++.
+
+ * devtools/document_template.pl:
+
+ Fixed a bug where template parser functions were seen as template
+ variables to be documented.
+
+ * docs/README:
+
+ Clarified how the value for 'pure_libs' is interpreted.
+
+ * templates/makedll.mpt:
+
+ Updated support for the GHS compiler.
+
Wed Sep 13 15:24:45 UTC 2006 Phil Mesnier <mesnier_p@ociweb.com>
* templates/em3.mpd:
diff --git a/config/mfc.mpb b/config/mfc.mpb
index aeb4b682..7f8a8f2e 100644
--- a/config/mfc.mpb
+++ b/config/mfc.mpb
@@ -6,8 +6,7 @@ project {
macros += _AFXDLL
specific(em3, nmake, vc6) {
subsystem = windows
- }
- specific(vc7, vc71, vc8) {
+ } else {
subsystem = 2
}
specific {
diff --git a/config/openssl.mpb b/config/openssl.mpb
index bcf945a5..f31fc25b 100644
--- a/config/openssl.mpb
+++ b/config/openssl.mpb
@@ -26,7 +26,7 @@ feature(openssl) {
specific(bmake) {
libpaths += $(SSL_ROOT)/lib/Builder5
}
- specific(vc6, vc7, vc71, vc8) {
+ specific(nmake, vc6, vc7, vc71, vc8) {
libpaths += $(SSL_ROOT)/lib/VC
}
}
diff --git a/devtools/document_template.pl b/devtools/document_template.pl
index 7f37fdb7..e77ca03b 100755
--- a/devtools/document_template.pl
+++ b/devtools/document_template.pl
@@ -223,7 +223,10 @@ if (open($fh, $input)) {
$tvar = undef;
}
elsif ($name eq 'if') {
- $vname =~ s/(flag_overrides\(.*\)|!|&&|\|\|)//g;
+ $vname =~ s/(!|&&|\|\|)//g;
+ foreach my $keyword (keys %keywords) {
+ $vname =~ s/$keyword\(.*\)//g;
+ }
if ($vname !~ /^\s*$/) {
$name = $vname;
$key = $vname;
diff --git a/docs/MPC.sgml b/docs/MPC.sgml
index e6d28827..8ee97b55 100644
--- a/docs/MPC.sgml
+++ b/docs/MPC.sgml
@@ -526,6 +526,17 @@
</para>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><envar>MPC_GHS_UNIX</envar></term>
+ <listitem>
+ <para>
+ this environment variable is only meaningful when generating
+ the ghs project files. By default, the ghs type assumes that it is for
+ Windows. If this is not the case, set this environment variable
+ prior to running MPC
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
</para>
<para>
diff --git a/docs/README b/docs/README
index fa4dcbe7..20ff41e8 100644
--- a/docs/README
+++ b/docs/README
@@ -197,8 +197,8 @@ libs Specifies 1 or more libraries to link into the exe or library
lit_libs Specifies 1 or more libraries to link into the exe or library.
If libraries receive a library decorator, then these will not.
pure_libs Specifies 1 or more libraries to link into the exe or library.
- If libraries receive a library decorator, then these will not.
- If libraries receive a file extension, then these will not.
+ The values specified for this variable are passed to the
+ linker unmodified.
after Specifies that this project must be built after 1 or more
project names listed.
custom_only Create a project that contains only custom generation
diff --git a/docs/USAGE b/docs/USAGE
index c24ecb66..08b267cf 100644
--- a/docs/USAGE
+++ b/docs/USAGE
@@ -279,6 +279,11 @@ Environment Variables
MPC_DEPENDENCY_COMBINED_STATIC_LIBRARY - See the -static section above.
+MPC_GHS_UNIX - This environment variable is only meaningful when generating
+the ghs project files. By default, the ghs type assumes that it is for
+Windows. If this is not the case, set this environment variable prior to
+running MPC.
+
The following environment variables are deprecated
and will be removed in a future version of MPC
--------------------------------------------------
diff --git a/docs/templates/ghs.txt b/docs/templates/ghs.txt
new file mode 100644
index 00000000..1221d709
--- /dev/null
+++ b/docs/templates/ghs.txt
@@ -0,0 +1,13 @@
+bsp = If a bsp is necessary, this variable should be set to the bsp name.
+libext = Similar to the common lib_ext except that this one is normally left to the default.
+no_use_pch = Set this to disable precompiled header support.
+os_dir = Set this to the full path of the OS directory (ex. C:\GHS\int507).
+postmkdir = Allows arbitrary text after the use of mkdir.
+primarytarget = This specifies the primaryTarget value that is placed in the toplevel workspace. Some example values are: ppc_integrity.tgt, ppc_linux.tgt, ppc_standalone.tgt and ppc_vxworks.tgt.
+reltop = This is the current directory of the project relative to the top-level directory.
+reltop_dllout = Similar to dllout except that it's relative to the top-level directory.
+reltop_exeout = Similar to exeout except that it's relative to the top-level directory.
+reltop_includes = Similar to includes except that it's relative to the top-level directory.
+reltop_libout = Similar to libout except that it's relative to the top-level directory.
+reltop_libpaths = Similar to libpaths except that it's relative to the top-level directory.
+slash = The value used to separate directories and files.
diff --git a/modules/GHSProjectCreator.pm b/modules/GHSProjectCreator.pm
index 83ffec4c..f74302f0 100644
--- a/modules/GHSProjectCreator.pm
+++ b/modules/GHSProjectCreator.pm
@@ -1,7 +1,10 @@
package GHSProjectCreator;
# ************************************************************
-# Description : Not a complete implementation for GHS
+# Description : A GHS project creator for version 4.x.
+# By default, this module assumes Multi will
+# be used on Windows. If it is not, you must
+# set the MPC_GHS_UNIX environment variable.
# Author : Chad Elliott
# Create Date : 4/19/2002
# ************************************************************
@@ -22,11 +25,46 @@ use vars qw(@ISA);
# ************************************************************
my($startre) = undef;
+my($ghsunix) = 'MPC_GHS_UNIX';
# ************************************************************
# Subroutine Section
# ************************************************************
+sub convert_slashes {
+ return (defined $ENV{$ghsunix} ? 0 : 1);
+}
+
+
+sub case_insensitive {
+ return (defined $ENV{$ghsunix} ? 0 : 1);
+}
+
+
+sub use_win_compatibility_commands {
+ return (defined $ENV{$ghsunix} ? 0 : 1);
+}
+
+
+sub post_file_creation {
+ my($self) = shift;
+
+ ## These special files are only used if it is a custom only project or
+ ## there are no source files in the project.
+ if ((defined $self->get_assignment('custom_only') ||
+ !defined $self->get_assignment('source_files')) &&
+ defined $self->get_assignment('custom_types')) {
+ my($fh) = new FileHandle();
+ if (open($fh, ">.custom_build_rule")) {
+ print $fh ".empty_html_file\n";
+ close($fh);
+ }
+ if (open($fh, ">.empty_html_file")) {
+ close($fh);
+ }
+ }
+}
+
sub compare_output {
#my($self) = shift;
return 1;
@@ -35,7 +73,7 @@ sub compare_output {
sub project_file_extension {
#my($self) = shift;
- return '.bld';
+ return '.gpj';
}
@@ -70,6 +108,16 @@ sub fill_value {
$value = '.';
}
}
+ elsif ($name eq 'slash') {
+ $value = (defined $ENV{$ghsunix} ? '/' : '\\');
+ }
+ else {
+ if (!defined $ENV{$ghsunix}) {
+ if ($name eq 'postmkdir') {
+ $value = ' || type nul';
+ }
+ }
+ }
return $value;
}
diff --git a/modules/GHSWorkspaceCreator.pm b/modules/GHSWorkspaceCreator.pm
index 5f53109a..0d214ec0 100644
--- a/modules/GHSWorkspaceCreator.pm
+++ b/modules/GHSWorkspaceCreator.pm
@@ -1,7 +1,7 @@
package GHSWorkspaceCreator;
# ************************************************************
-# Description : An incomplete GHS Workspace creator
+# Description : A GHS Workspace creator for version 4.x
# Author : Chad Elliott
# Create Date : 7/3/2002
# ************************************************************
@@ -18,13 +18,12 @@ use WorkspaceCreator;
use vars qw(@ISA);
@ISA = qw(WorkspaceCreator);
-my(%directives) = ('sysincdirs' => 1,
- 'libdirs' => 1,
- 'syslibdirs' => 1,
- 'libraries' => 1,
- 'defines' => 1,
- 'staticlink' => 1,
- 'deflibdirs' => 1,
+my(%directives) = ('I' => 1,
+ 'L' => 1,
+ 'D' => 1,
+ 'l' => 1,
+ 'G' => 1,
+ 'non_shared' => 1,
);
# ************************************************************
@@ -39,7 +38,7 @@ sub compare_output {
sub workspace_file_name {
my($self) = shift;
- return $self->get_modified_workspace_name('default', '.bld');
+ return $self->get_modified_workspace_name('default', '.gpj');
}
@@ -47,15 +46,35 @@ sub pre_workspace {
my($self) = shift;
my($fh) = shift;
my($crlf) = $self->crlf();
+ my($prjs) = $self->get_projects();
+ my($tgt) = undef;
+
+ ## Take the primaryTarget from the first project in the list
+ if (defined $$prjs[0]) {
+ my($fh) = new FileHandle();
+ my($outdir) = $self->get_outdir();
+ if (open($fh, "$outdir/$$prjs[0]")) {
+ while(<$fh>) {
+ if (/^#primaryTarget=(.+)$/) {
+ $tgt = $1;
+ last;
+ }
+ }
+ close($fh);
+ }
+ }
- print $fh "#!build$crlf",
- "default:$crlf",
- "\tnobuild$crlf",
- "\t:cx_option=exceptions$crlf",
- "\t:cx_option=std_namespaces$crlf",
- "\t:language=cxx$crlf",
- "\t:config_setting=longlong$crlf",
- "\t:cx_mode=ansi$crlf";
+ ## Print out the preliminary information
+ print $fh "#!gbuild$crlf",
+ "primaryTarget=$tgt$crlf",
+ "[Project]$crlf",
+ "\t-I.$crlf",
+ "\t:sourceDir=.$crlf",
+ "\t--std$crlf",
+ "\t--exceptions$crlf",
+ "\t-language=cxx$crlf",
+ "\t--long_long$crlf",
+ "\t--new_style_casts$crlf";
}
@@ -68,23 +87,23 @@ sub mix_settings {
my($outdir) = $self->get_outdir();
## Things that seem like they should be set in the project
- ## actually have to be set in the controlling build file.
+ ## actually have to be set in the controlling project file.
if (open($rh, "$outdir/$project")) {
while(<$rh>) {
- if (/^\s*(program|library|subproject)\s*$/) {
- $mix .= "\t$1$crlf" .
- "\t:object_dir=" . $self->mpc_dirname($project) .
+ if (/^\s*(\[(Program|Library|Subproject)\])\s*$/) {
+ $mix .= "\t\t$1$crlf" .
+ "\t-object_dir=" . $self->mpc_dirname($project) .
'/.obj' . $crlf;
}
- elsif (/^\s*(shared_library)\s*$/) {
- $mix .= "\t$1$crlf" .
- "\t:config_setting=pic$crlf" .
- "\t:object_dir=" . $self->mpc_dirname($project) .
+ elsif (/^\s*(\[Shared Object\])\s*$/) {
+ $mix .= "\t\t$1$crlf" .
+ "\t-pic$crlf" .
+ "\t-object_dir=" . $self->mpc_dirname($project) .
'/.shobj' . $crlf;
}
else {
- if (/^\s*:(\w+)=/) {
- if (defined $directives{$1}) {
+ if (/^\s*\-((\w)\w*)/) {
+ if (defined $directives{$2} || defined $directives{$1}) {
$mix .= $_;
}
}
@@ -92,6 +111,7 @@ sub mix_settings {
}
close($rh);
}
+ $mix .= $crlf if ($mix eq '');
return $mix;
}
@@ -100,12 +120,10 @@ sub mix_settings {
sub write_comps {
my($self) = shift;
my($fh) = shift;
- my($crlf) = $self->crlf();
## Print out each projet
foreach my $project ($self->sort_dependencies($self->get_projects(), 0)) {
- print $fh "$project$crlf",
- $self->mix_settings($project);
+ print $fh "$project", $self->mix_settings($project);
}
}
diff --git a/modules/ProjectCreator.pm b/modules/ProjectCreator.pm
index 07ac33b7..32b0d502 100644
--- a/modules/ProjectCreator.pm
+++ b/modules/ProjectCreator.pm
@@ -1979,7 +1979,6 @@ sub add_explicit_output {
}
push(@files, "$dir$check");
- $files[$#files] =~ s/\//\\/g if ($self->{'convert_slashes'});
last;
}
}
@@ -3400,7 +3399,8 @@ sub get_command_subs {
my(%valid) = ();
## Add the built-in OS compatibility commands
- if (UNIVERSAL::isa($self, 'WinProjectBase')) {
+ if (UNIVERSAL::isa($self, 'WinProjectBase') ||
+ $self->use_win_compatibility_commands()) {
$valid{'cat'} = 'type';
$valid{'cmp'} = 'fc';
$valid{'cp'} = 'copy /y';
@@ -4660,6 +4660,12 @@ sub resolve_alias {
# Virtual Methods To Be Overridden
# ************************************************************
+sub use_win_compatibility_commands {
+ #my($self) = shift;
+ return 0;
+}
+
+
sub post_file_creation {
#my($self) = shift;
#my($file) = shift;
diff --git a/modules/TemplateParser.pm b/modules/TemplateParser.pm
index 1e56ba4f..bc2f78a4 100644
--- a/modules/TemplateParser.pm
+++ b/modules/TemplateParser.pm
@@ -61,6 +61,7 @@ my(%keywords) = ('if' => 0,
'transdir' => 5,
'has_extension' => 5,
'keyname_used' => 0,
+ 'scope' => 0,
);
my(%target_type_vars) = ('type_is_static' => 1,
@@ -101,6 +102,7 @@ sub new {
$self->{'dupfiles'} = {};
$self->{'override_target_type'} = undef;
$self->{'keyname_used'} = {};
+ $self->{'scopes'} = {};
$self->{'foreach'} = {};
$self->{'foreach'}->{'count'} = -1;
@@ -187,7 +189,22 @@ sub append_current {
$_[0]->{'eval_str'} .= $_[1];
}
else {
- $_[0]->{'built'} .= $_[1];
+ my($value) = $_[1];
+ my($scope) = $_[0]->{'scopes'};
+ while(defined $$scope{'scope'}) {
+ $scope = $$scope{'scope'};
+ if (defined $$scope{'escape'}) {
+ my($key) = $$scope{'escape'};
+ if ($key eq '\\') {
+ $value =~ s/\\/\\\\/g;
+ }
+ else {
+ $value =~ s/$key/\\$key/g;
+ }
+ }
+ }
+
+ $_[0]->{'built'} .= $value;
}
}
@@ -801,6 +818,33 @@ sub handle_keyname_used {
}
+sub handle_scope {
+ my($self) = shift;
+ my($str) = shift;
+
+ if (defined $str) {
+ my($state, $func, $param) = $self->split_parameters($str);
+ if (defined $state) {
+ my($pscope) = undef;
+ my($scope) = $self->{'scopes'};
+
+ while(defined $$scope{'scope'}) {
+ $pscope = $scope;
+ $scope = $$scope{'scope'};
+ }
+ if ($state eq 'enter') {
+ $$scope{'scope'} = {$func => $self->process_special($param)};
+ }
+ elsif ($state eq 'leave') {
+ delete $$pscope{'scope'} if (defined $pscope);
+ }
+ }
+ else {
+ $self->warning("The scope function requires 1 to 3 parameters.");
+ }
+ }
+}
+
sub get_has_extension {
my($self) = shift;
my($str) = shift;
diff --git a/templates/ghs.mpd b/templates/ghs.mpd
index 00ca7cab..dcef2b65 100644
--- a/templates/ghs.mpd
+++ b/templates/ghs.mpd
@@ -1,133 +1,192 @@
-#!build
-default:
+#!gbuild
+#primaryTarget=<%primaryTarget("ppc_standalone.tgt")%>
<%if(exename)%>
- program
- :outputname=<%if(exeout)%><%reltop_exeout%><%else%><%reltop%><%endif%>/<%exename%><%if(use_exe_modifier)%><%lib_modifier%><%endif%>
+ [Program]
+ -o <%if(exeout)%><%reltop_exeout%><%else%><%reltop%><%endif%>/<%exename%><%if(use_exe_modifier)%><%lib_modifier%><%endif%>
<%if(need_staticflags)%>
- :staticlink=true
+ {optional} -non_shared
<%endif%>
<%else%>
<%if(sharedname)%>
- shared_library
- :outputname=<%if(dllout)%><%reltop_dllout%><%else%><%reltop_libout%><%endif%>/<%lib_prefix%><%libname_prefix%><%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%libext(".so")%>
+ [Shared Object]
+ -o <%if(dllout)%><%reltop_dllout%><%else%><%reltop_libout%><%endif%>/<%lib_prefix%><%libname_prefix%><%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%libext(".so")%>
<%else%>
<%if(staticname)%>
- library
- :outputname=<%reltop_libout%>/<%lib_prefix%><%libname_prefix%><%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%libext(".a")%>
+ [Library]
+ -o <%reltop_libout%>/<%lib_prefix%><%libname_prefix%><%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%libext(".a")%>
<%else%>
- subproject
+ [Subproject]
<%endif%>
<%endif%>
<%endif%>
-<%foreach(custom_types)%>
-<%foreach(custom_type->input_files)%>
-<%custom_type->input_file%>
- custom
- :custom_processor.name=echo
-<%if(custom_type->input_file->output_files)%>
- :depends=<%if(flag_overrides(custom_type->input_file, dependent))%><%foreach(dep, flag_overrides(custom_type->input_file, dependent))%><%dep%><%if(!has_extension(dep))%><%exe_ext%><%endif%> <%endfor%><%else%><%foreach(custom_type->dependent)%><%custom_type->dependent%><%if(!has_extension(custom_type->dependent))%><%exe_ext%><%endif%> <%endfor%><%endif%><%custom_type->input_file%><%if(custom_type->input_file->dependencies)%> <%custom_type->input_file->dependencies%><%endif%>
-<%if(flag_overrides(custom_type->input_file, gendir))%>
- :preexec=cd <%reltop%>; <%mkdir("mkdir -p")%> <%flag_overrides(custom_type->input_file, gendir)%><%postmkdir%>
-<%endif%>
-<%if(custom_type->output_option)%>
-<%foreach(custom_type->input_file->output_files)%>
- :preexec=cd <%reltop%>; <%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%> <%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%><%if(custom_type->output_option)%> <%custom_type->output_option%> <%custom_type->input_file->output_file%><%endif%> <%custom_type->input_file%>
-<%endfor%>
-<%else%>
- :preexec=cd <%reltop%>; <%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%> <%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> <%custom_type->input_file%><%endif%>
-<%if(flag_overrides(custom_type->input_file, postcommand))%>
-<%foreach(custom_type->input_file)%>
- :preexec=cd <%reltop%>; <%flag_overrides(custom_type->input_file, postcommand)%>
-<%endfor%>
-<%else%>
-<%if(custom_type->postcommand)%>
-<%foreach(custom_type->input_file)%>
- :preexec=cd <%reltop%>; <%custom_type->postcommand%>
-<%endfor%>
-<%endif%>
-<%endif%>
-<%if(pch_header && custom_type->pch_postrule)%>
-<%foreach(custom_type->input_file->source_output_files)%>
- :preexec=cd <%reltop%>; echo #include "<%pch_header%>" > temporary.src
- :preexec=cd <%reltop%>; <%cat("cat")%> <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%> >> temporary.src
- :preexec=cd <%reltop%>; <%mv("mv -f")%> temporary.src <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%>
-<%endfor%>
+<%if(bsp)%>
+ -bsp <%bsp%>
<%endif%>
-
+<%if(os_dir)%>
+ -os_dir <%os_dir%>
<%endif%>
-<%endfor%>
-<%endfor%>
<%if(optimize)%>
- :optimizestrategy=speed
+ -Ospeed
+ -OI
+<%else%>
+ -G
<%endif%>
-<%if(pch_header)%>
- :cx_pch_option=automatic
- :cx_pch_dir=pch
+<%if(pch_header && !no_use_pch)%>
+ --pch
+<%foreach(pch_defines)%>
+ -D<%pch_define%>
+<%endfor%>
<%endif%>
<%foreach(reltop_includes)%>
- :sysincdirs=<%reltop_include%>
+ -I<%reltop_include%>
<%endfor%>
<%foreach(reltop_libpaths)%>
- :libdirs=<%reltop_libpath%>
+ -L<%reltop_libpath%>
<%endfor%>
-<%if(syslibdirs)%>
- :syslibdirs=<%syslibdirs%>
-<%endif%>
-<%if(deflibdirs)%>
- :deflibdirs=<%deflibdirs%>
-<%endif%>
<%if(libs || lit_libs || pure_libs)%>
<%if(exename || sharedname)%>
<%foreach(libs)%>
- :libraries=-l<%libname_prefix%><%lib%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>
+ -l<%libname_prefix%><%lib%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>
<%endfor%>
<%foreach(lit_libs)%>
- :libraries=-l<%lit_lib%>
+ -l<%lit_lib%>
<%endfor%>
<%foreach(pure_libs)%>
- :libraries=<%pure_lib%>
+ <%pure_lib%>
<%endfor%>
<%endif%>
<%endif%>
<%if(sharedname)%>
<%foreach(dynamicflags)%>
- :defines=<%dynamicflag%>
+ -D<%dynamicflag%>
<%endfor%>
<%endif%>
<%if(need_staticflags)%>
<%foreach(staticflags)%>
- :defines=<%staticflag%>
+ -D<%staticflag%>
<%endfor%>
<%endif%>
<%if(macros)%>
<%foreach(macros)%>
- :defines=<%macro%>
+ -D<%macro%>
+<%endfor%>
+<%endif%>
+<%if(compile_flags)%>
+<%foreach(compile_flags)%>
+ <%compile_flag%>
+<%endfor%>
+<%endif%>
+<%if(custom_only || !source_files && custom_types)%>
+.custom_build_rule [HTML Source]
+<%endif%>
+<%scope(enter, escape, \\)%>
+<%foreach(custom_types)%>
+<%foreach(custom_type->input_files)%>
+<%if(!custom_only && source_files)%>
+<%custom_type->input_file%> [Text]
+<%endif%>
+<%if(custom_type->input_file->output_files)%>
+<%if(custom_type->output_option)%>
+<%foreach(custom_type->input_file->output_files)%>
+<%if(!custom_only && source_files)%>
+<%custom_type->input_file->output_file%>
+<%endif%>
+<%if(flag_overrides(custom_type->input_file, dependent))%>
+<%foreach(dep, flag_overrides(custom_type->input_file, dependent))%>
+ :dependsRelative=<%dep%><%if(!has_extension(dep))%><%exe_ext%><%endif%>
<%endfor%>
+<%else%>
+<%foreach(custom_type->dependent)%>
+ :dependsRelative=<%custom_type->dependent%><%if(!has_extension(custom_type->dependent))%><%exe_ext%><%endif%>
+<%endfor%>
+<%endif%>
+ :dependsRelative=<%custom_type->input_file%>
+<%if(custom_type->input_file->dependencies)%>
+<%foreach(custom_type->input_file->dependencies)%>
+ :dependsRelative=<%custom_type->input_file->dependencie%>
+<%endfor%>
+<%endif%>
+<%if(flag_overrides(custom_type->input_file, gendir))%>
+ :preexecShell='cd <%reltop%> && <%mkdir%> <%flag_overrides(custom_type->input_file, gendir)%><%postmkdir%>'
+<%endif%>
+ :preexecShell='cd <%reltop%> && <%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%> <%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%><%if(custom_type->output_option)%> <%custom_type->input_file%> <%custom_type->output_option%> <%custom_type->input_file->output_file%><%else%> <%custom_type->input_file%><%endif%>'
+<%endfor%>
+<%else%>
+<%if(!custom_only && source_files)%>
+<%foreach(custom_type->input_file->source_output_files)%>
+<%if(forfirst)%>
+<%custom_type->input_file->source_output_file%>
+<%endif%>
+<%endfor%>
+<%endif%>
+<%if(flag_overrides(custom_type->input_file, dependent))%>
+<%foreach(dep, flag_overrides(custom_type->input_file, dependent))%>
+ :dependsRelative=<%dep%><%if(!has_extension(dep))%><%exe_ext%><%endif%>
+<%endfor%>
+<%else%>
+<%foreach(custom_type->dependent)%>
+ :dependsRelative=<%custom_type->dependent%><%if(!has_extension(custom_type->dependent))%><%exe_ext%><%endif%>
+<%endfor%>
+<%endif%>
+ :dependsRelative=<%custom_type->input_file%>
+<%if(custom_type->input_file->dependencies)%>
+<%foreach(custom_type->input_file->dependencies)%>
+ :dependsRelative=<%custom_type->input_file->dependencie%>
+<%endfor%>
+<%endif%>
+<%if(flag_overrides(custom_type->input_file, gendir))%>
+ :preexecShell='cd <%reltop%> && <%mkdir%> <%flag_overrides(custom_type->input_file, gendir)%><%postmkdir%>'
<%endif%>
+ :preexecShell='cd <%reltop%> && <%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%> <%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> <%custom_type->input_file%>'
+<%if(flag_overrides(custom_type->input_file, postcommand))%>
+<%foreach(custom_type->input_file)%>
+ :preexecShell='cd <%reltop%> && <%flag_overrides(custom_type->input_file, postcommand)%>'
+<%endfor%>
+<%else%>
+<%if(custom_type->postcommand)%>
+<%foreach(custom_type->input_file)%>
+ :preexecShell='cd <%reltop%> && <%custom_type->postcommand%>'
+<%endfor%>
+<%endif%>
+<%endif%>
+<%if(pch_header && !no_use_pch && custom_type->pch_postrule)%>
+<%foreach(custom_type->input_file->source_output_files)%>
+ :preexecShell='cd <%reltop%> && echo #include "<%pch_header%>" > temporary.src'
+ :preexecShell='cd <%reltop%> && <%cat%> <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%><%slash%><%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%> >> temporary.src'
+ :preexecShell='cd <%reltop%> && <%mv%> temporary.src <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%><%slash%><%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%>'
+<%endfor%>
+<%endif%>
+<%endif%>
+<%foreach(custom_type->input_file->output_files)%>
+ :extraOutputFile=<%custom_type->input_file->output_file%>
+<%endfor%>
+<%if(custom_only || !source_files)%>
+ -c
+ :postexecShell='<%rm%> .c && <%rm%> .h'
+<%endif%>
+<%endif%>
+<%endfor%>
+<%endfor%>
+<%scope(leave)%>
<%foreach(source_files)%>
<%source_file%>
- C++
<%if(compile_flags)%>
- :cxx_compiler.args=<%compile_flags%><%if(flag_overrides(source_file, buildflags))%> <%flag_overrides(source_file, buildflags)%><%endif%>
+ -cxx_compiler.args=<%compile_flags%><%if(flag_overrides(source_file, buildflags))%> <%flag_overrides(source_file, buildflags)%><%endif%>
<%else%>
<%if(flag_overrides(source_file, buildflags))%>
- :cxx_compiler.args=<%flag_overrides(source_file, buildflags)%>
+ -cxx_compiler.args=<%flag_overrides(source_file, buildflags)%>
<%endif%>
<%endif%>
<%endfor%>
<%foreach(header_files)%>
<%header_file%>
- include_file
<%endfor%>
<%foreach(inline_files)%>
<%inline_file%>
- include_file
<%endfor%>
<%foreach(resource_files)%>
<%resource_file%>
- script
<%endfor%>
<%foreach(documentation_files)%>
-<%documentation_file%>
- documentation
+<%documentation_file%> [Documentation]
<%endfor%>
diff --git a/templates/ghscommon.mpt b/templates/ghscommon.mpt
index 6e83d4a2..70911770 100644
--- a/templates/ghscommon.mpt
+++ b/templates/ghscommon.mpt
@@ -5,6 +5,4 @@ conditional_include "common"
conditional_include "unixcommon"
optimize = 1
-syslibdirs =
-deflibdirs =
lib_modifier =
diff --git a/templates/makedll.mpt b/templates/makedll.mpt
index 31f67be7..c8cde733 100644
--- a/templates/makedll.mpt
+++ b/templates/makedll.mpt
@@ -186,10 +186,10 @@ NCC {
}
ghsppc {
- cxx = cxppc
- ar = cxppc
- arflags = -archive -o
- compilerflags = --one_instantiation_per_object --exceptions
+ cxx = cxintppc
+ ar = cxintppc
+ arflags = --one_instantiation_per_object -archive -o
+ compilerflags = --new_style_casts --one_instantiation_per_object --exceptions --std --long_long
platforms = integrity
}
@@ -344,18 +344,15 @@ tandem {
// For Integrity, the following should be set as environment variables, on
// the make command line or within a verbatim section in your mpc file.
//
-// GHSROOT The full path to your Green Hills installation.
-// RTOSROOT The full path to your BSP installation (probably $GHSROOT).
-// BSP The BSP name (ex. sim800).
-// TARGET_BSP The full path to your target BSP.
-// TARGET_LD The full path to your target ld file.
+// OS_DIR The full path to your BSP installation.
+// BSP The BSP name (ex. sim800).
//
integrity {
versupport =
dll_ext =
- ldlibs = -lshm_client -lnet -livfssca -lposixsca
- extraarflags = -bspname=$(RTOSROOT)/target/$(BSP).bld
- extracppflags = -integrate -dynamic -bspname=$(RTOSROOT)/target/$(BSP).bld -os_dir $(GHSROOT) -non_shared -Uvector -bspfile=$(TARGET_BSP) $(TARGET_LD)
+ ldlibs = -lshm_client -lnet -lsocket -lposix
+ extraarflags = -bsp $(BSP) -os_dir $(OS_DIR) --one_instantiation_per_object
+ extracppflags = -integrate -dynamic -bsp $(BSP) -os_dir $(OS_DIR) --one_instantiation_per_object -non_shared -Uvector
}
conditional_include "user_makedll"