diff options
author | Adrian Dudau <adrian.dudau@enea.com> | 2013-12-12 13:36:50 +0100 |
---|---|---|
committer | Adrian Dudau <adrian.dudau@enea.com> | 2013-12-12 15:25:03 +0100 |
commit | 41ac47d732eed8392d60d0f6773e5a279d49b999 (patch) | |
tree | cf19d099db9cfdb8d73aa21c31e7aa1cc86ff860 /plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCPPAutotoolsProject | |
download | eclipse-poky-juno-master.tar.gz |
Migrated from the internal git server on the dora-enea branch
Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCPPAutotoolsProject')
11 files changed, 286 insertions, 0 deletions
diff --git a/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/Basename.cpp b/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/Basename.cpp new file mode 100644 index 0000000..986dd35 --- /dev/null +++ b/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/Basename.cpp | |||
@@ -0,0 +1,11 @@ | |||
1 | |||
2 | |||
3 | #include <iostream> | ||
4 | |||
5 | using namespace std; | ||
6 | |||
7 | int main(void) { | ||
8 | cout << "Hello World" << endl; /* prints Hello World */ | ||
9 | return 0; | ||
10 | } | ||
11 | |||
diff --git a/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/ChangeLog b/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/ChangeLog new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/ChangeLog | |||
diff --git a/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/INSTALL b/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/INSTALL new file mode 100644 index 0000000..b8b0535 --- /dev/null +++ b/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/INSTALL | |||
@@ -0,0 +1,9 @@ | |||
1 | Building: | ||
2 | $ ./autogen.sh [--enable-gtk-doc] [--prefix=/usr] | ||
3 | $ make | ||
4 | |||
5 | Installing: | ||
6 | $ sudo make install | ||
7 | |||
8 | Running: | ||
9 | $ $(projectName) \ No newline at end of file | ||
diff --git a/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/Makefile.am.src b/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/Makefile.am.src new file mode 100644 index 0000000..1ea3308 --- /dev/null +++ b/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/Makefile.am.src | |||
@@ -0,0 +1,8 @@ | |||
1 | |||
2 | bin_PROGRAMS = $(projectName) | ||
3 | $(projectName)_SOURCES = $(projectName).cpp | ||
4 | |||
5 | AM_CXXFLAGS = @$(projectName)_CFLAGS@ | ||
6 | AM_LDFLAGS = @$(projectName)_LIBS@ | ||
7 | |||
8 | CLEANFILES = *~ | ||
diff --git a/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/Makefile.am.top b/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/Makefile.am.top new file mode 100644 index 0000000..6060599 --- /dev/null +++ b/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/Makefile.am.top | |||
@@ -0,0 +1,6 @@ | |||
1 | EXTRA_DIST = autogen.sh | ||
2 | SUBDIRS = $(sourceDir) | ||
3 | |||
4 | DISTCHECK_CONFIGURE_FLAGS= | ||
5 | |||
6 | CLEANFILES = *~ \ No newline at end of file | ||
diff --git a/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/NEWS b/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/NEWS new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/NEWS | |||
diff --git a/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/README b/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/README new file mode 100644 index 0000000..ec15541 --- /dev/null +++ b/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/README | |||
@@ -0,0 +1,25 @@ | |||
1 | $(projectName) | ||
2 | Copyright (C) $(copyright). | ||
3 | |||
4 | Brief description of project.... | ||
5 | |||
6 | ----------------------------------------------------------------------------- | ||
7 | Build | ||
8 | ----------------------------------------------------------------------------- | ||
9 | $ ./autogen.sh $CONFIGURE_FLAGS | ||
10 | $ make | ||
11 | |||
12 | ----------------------------------------------------------------------------- | ||
13 | Build with documentation generated (usually for libraries) | ||
14 | ----------------------------------------------------------------------------- | ||
15 | $ ./autogen.sh --enable-gtk-doc | ||
16 | $ make | ||
17 | |||
18 | ( If built with the --enable-gtk-doc flag above you can view the index.html | ||
19 | file in your web browser. ) | ||
20 | $ firefox ./docs/reference/index.html | ||
21 | |||
22 | ----------------------------------------------------------------------------- | ||
23 | Install | ||
24 | ----------------------------------------------------------------------------- | ||
25 | $ sudo make install | ||
diff --git a/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/autogen.sh b/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/autogen.sh new file mode 100755 index 0000000..7fd81e2 --- /dev/null +++ b/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/autogen.sh | |||
@@ -0,0 +1,10 @@ | |||
1 | #! /bin/sh | ||
2 | [ -e config.cache ] && rm -f config.cache | ||
3 | |||
4 | libtoolize --automake | ||
5 | aclocal ${OECORE_ACLOCAL_OPTS} | ||
6 | autoconf | ||
7 | autoheader | ||
8 | automake -a | ||
9 | ./configure $@ | ||
10 | exit | ||
diff --git a/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/configure.ac.top b/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/configure.ac.top new file mode 100644 index 0000000..5cc622b --- /dev/null +++ b/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/configure.ac.top | |||
@@ -0,0 +1,47 @@ | |||
1 | AC_PREREQ(2.61) | ||
2 | |||
3 | # package version number (not shared library version) | ||
4 | # odd micro numbers indicate in-progress development | ||
5 | # even micro numbers indicate released versions | ||
6 | m4_define($(projectName)_version_major, 0) | ||
7 | m4_define($(projectName)_version_minor, 1) | ||
8 | m4_define($(projectName)_version_micro, 0) | ||
9 | |||
10 | m4_define([$(projectName)_version], | ||
11 | [$(projectName)_version_major.$(projectName)_version_minor.$(projectName)_version_micro]) | ||
12 | m4_define([$(projectName)_api_version], | ||
13 | [$(projectName)_version_major.$(projectName)_version_minor]) | ||
14 | |||
15 | AC_INIT($(projectName), $(projectName)_version) | ||
16 | AM_INIT_AUTOMAKE($(projectName), $(projectName)_version) | ||
17 | AC_CONFIG_HEADERS(config.h) | ||
18 | |||
19 | # Checks for programs. | ||
20 | AC_PROG_LIBTOOL | ||
21 | AC_PROG_CXX | ||
22 | AC_PROG_INSTALL | ||
23 | |||
24 | # enable pkg-config | ||
25 | PKG_PROG_PKG_CONFIG | ||
26 | |||
27 | # Checks for library functions. | ||
28 | #AC_CHECK_FUNCS([memset]) | ||
29 | |||
30 | AC_SUBST($(projectName)_CFLAGS) | ||
31 | AC_SUBST($(projectName)_LIBS) | ||
32 | |||
33 | |||
34 | #icondir=${datadir}/icons/hicolor/32x32/apps | ||
35 | #AC_SUBST(icondir) | ||
36 | |||
37 | AC_OUTPUT([ | ||
38 | Makefile | ||
39 | $(sourceDir)/Makefile | ||
40 | ]) | ||
41 | |||
42 | echo "" | ||
43 | echo " $(projectName) $VERSION" | ||
44 | echo " =====================" | ||
45 | echo "" | ||
46 | echo " To build the project, run \"make\"" | ||
47 | echo "" | ||
diff --git a/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCPPAutotoolsProject/template.properties b/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCPPAutotoolsProject/template.properties new file mode 100644 index 0000000..0534ca6 --- /dev/null +++ b/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCPPAutotoolsProject/template.properties | |||
@@ -0,0 +1,28 @@ | |||
1 | ############################################################################### | ||
2 | # Copyright (c) 2007, 2009 Symbian Software Private Ltd. and others. | ||
3 | # All rights reserved. This program and the accompanying materials | ||
4 | # are made available under the terms of the Eclipse Public License v1.0 | ||
5 | # which accompanies this distribution, and is available at | ||
6 | # http://www.eclipse.org/legal/epl-v10.html | ||
7 | # | ||
8 | # Contributors: | ||
9 | # Bala Torati (Symbian) - initial API and implementation | ||
10 | # Red Hat Inc - modification to use with Autotools project | ||
11 | ############################################################################### | ||
12 | |||
13 | #Template Default Values | ||
14 | HelloWorld.CCtemplate.label= Hello World C++ Autotools Project | ||
15 | HelloWorld.CCtemplate.description=A skeletal C++ Hello World project. Creates a folder for sources and autogen artifacts. | ||
16 | HelloWorld.basics.label=Basic Settings | ||
17 | HelloWorld.basics.description=Basic properties of a project | ||
18 | HelloWorld.author.label=Author | ||
19 | HelloWorld.author.description=Name of the author | ||
20 | HelloWorld.copyright.label=Copyright notice | ||
21 | HelloWorld.copyright.description=The name of the copyright holder (e.g. XYZ Corporation) | ||
22 | HelloWorld.copyright.default=Your copyright notice | ||
23 | HelloWorld.message.default=Hello World | ||
24 | HelloWorld.message.description=Your hello world greeting message | ||
25 | HelloWorld.message.label=Hello world greeting | ||
26 | HelloWorld.sourceDir.label=Source | ||
27 | HelloWorld.sourceDir.description=Directory for hello world project source files | ||
28 | HelloWorld.sourceDir.default=src | ||
diff --git a/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCPPAutotoolsProject/template.xml b/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCPPAutotoolsProject/template.xml new file mode 100644 index 0000000..2bf76bf --- /dev/null +++ b/plugins/org.yocto.sdk.ide/templates/projecttemplates/HelloWorldCPPAutotoolsProject/template.xml | |||
@@ -0,0 +1,142 @@ | |||
1 | <?xml version="1.0" encoding="ISO-8859-1"?> | ||
2 | <template type="ProjTempl" version="1.0" supplier="Eclipse.org" revision="1.0" author="Bala Torati (Symbian)" | ||
3 | copyright="Copyright (c) 2007,2009 Symbian Software Limited and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available athttp://www.eclipse.org/legal/epl-v10.html" | ||
4 | id="YoctoHelloWorldCPPAutotoolsProject" label="%HelloWorld.CCtemplate.label" description="%HelloWorld.CCtemplate.description" | ||
5 | help="help.html"> | ||
6 | |||
7 | <property-group id="basics" label="%HelloWorld.basics.label" description="%HelloWorld.basics.description" type="PAGES-ONLY" help="help.html"> | ||
8 | <property id="author" | ||
9 | label="%HelloWorld.author.label" | ||
10 | description="%HelloWorld.author.description" | ||
11 | type="input" | ||
12 | pattern=".+" | ||
13 | default="" | ||
14 | hidden="false" | ||
15 | mandatory="true" | ||
16 | persist="true"/> | ||
17 | <property id="copyright" | ||
18 | label="%HelloWorld.copyright.label" | ||
19 | description="%HelloWorld.copyright.description" | ||
20 | type="input" | ||
21 | pattern=".+" | ||
22 | default="%HelloWorld.copyright.default" | ||
23 | hidden="false" | ||
24 | mandatory="true" | ||
25 | persist="true"/> | ||
26 | <property id="message" | ||
27 | label="%HelloWorld.message.label" | ||
28 | description="%HelloWorld.message.description" | ||
29 | type="input" | ||
30 | pattern=".+" | ||
31 | default="%HelloWorld.message.default" | ||
32 | hidden="false" | ||
33 | mandatory="true" | ||
34 | persist="true"/> | ||
35 | <property id="sourceDir" | ||
36 | label="%HelloWorld.sourceDir.label" | ||
37 | description="%HelloWorld.sourceDir.description" | ||
38 | type="input" | ||
39 | default="%HelloWorld.sourceDir.default" | ||
40 | pattern="[a-zA-Z0-9]+" | ||
41 | mandatory="true" | ||
42 | persist="true"/> | ||
43 | <property id="license" label="License" description="License" type="select" default="BSD" mandatory="false" persist="true"> | ||
44 | <item label="BSD License" name="BSD"/> | ||
45 | <item label="MIT License" name="MIT"/> | ||
46 | <item label="GNU General Public License v2.0" name="GPLv2"/> | ||
47 | <item label="GNU General Public License v2.0_or_later" name="GPLv2_or_later"/> | ||
48 | <item label="GNU General Public License v3.0" name="GPLv3"/> | ||
49 | <item label="Other" name="Other"/> | ||
50 | </property> | ||
51 | </property-group> | ||
52 | |||
53 | <process type="org.yocto.sdk.ide.NewYoctoProject"> | ||
54 | <simple name="name" value="$(projectName)" /> | ||
55 | <simple name="artifactExtension" value="exe" /> | ||
56 | <simple name="isCProject" value="false" /> | ||
57 | <simple name="isEmptyProject" value="false" /> | ||
58 | <simple name="isAutotoolsProject" value="true" /> | ||
59 | <simple name="isCMakeProject" value="false" /> | ||
60 | </process> | ||
61 | |||
62 | <process type="org.eclipse.cdt.core.CreateSourceFolder"> | ||
63 | <simple name="projectName" value="$(projectName)"/> | ||
64 | <simple name="path" value="$(sourceDir)"/> | ||
65 | </process> | ||
66 | |||
67 | <process type="org.eclipse.cdt.core.AddFiles"> | ||
68 | <simple name="projectName" value="$(projectName)"/> | ||
69 | <complex-array name="files"> | ||
70 | <element> | ||
71 | <simple name="source" value="../Licenses/AUTHORS"/> | ||
72 | <simple name="target" value="AUTHORS"/> | ||
73 | <simple name="replaceable" value="true"/> | ||
74 | </element> | ||
75 | <element> | ||
76 | <simple name="source" value="../Licenses/COPYING_$(license)"/> | ||
77 | <simple name="target" value="COPYING"/> | ||
78 | <simple name="replaceable" value="true"/> | ||
79 | </element> | ||
80 | <element> | ||
81 | <simple name="source" value="../Licenses/Header_$(license)"/> | ||
82 | <simple name="target" value="$(sourceDir)/$(projectName).cpp"/> | ||
83 | <simple name="replaceable" value="true"/> | ||
84 | </element> | ||
85 | <element> | ||
86 | <simple name="source" value="src/autogen.sh"/> | ||
87 | <simple name="target" value="autogen.sh"/> | ||
88 | <simple name="replaceable" value="true"/> | ||
89 | </element> | ||
90 | <element> | ||
91 | <simple name="source" value="src/ChangeLog"/> | ||
92 | <simple name="target" value="ChangeLog"/> | ||
93 | <simple name="replaceable" value="true"/> | ||
94 | </element> | ||
95 | <element> | ||
96 | <simple name="source" value="src/configure.ac.top"/> | ||
97 | <simple name="target" value="configure.ac"/> | ||
98 | <simple name="replaceable" value="true"/> | ||
99 | </element> | ||
100 | <element> | ||
101 | <simple name="source" value="src/INSTALL"/> | ||
102 | <simple name="target" value="INSTALL"/> | ||
103 | <simple name="replaceable" value="true"/> | ||
104 | </element> | ||
105 | <element> | ||
106 | <simple name="source" value="src/Makefile.am.src"/> | ||
107 | <simple name="target" value="$(sourceDir)/Makefile.am"/> | ||
108 | <simple name="replaceable" value="true"/> | ||
109 | </element> | ||
110 | <element> | ||
111 | <simple name="source" value="src/Makefile.am.top"/> | ||
112 | <simple name="target" value="Makefile.am"/> | ||
113 | <simple name="replaceable" value="true"/> | ||
114 | </element> | ||
115 | <element> | ||
116 | <simple name="source" value="src/NEWS"/> | ||
117 | <simple name="target" value="NEWS"/> | ||
118 | <simple name="replaceable" value="true"/> | ||
119 | </element> | ||
120 | <element> | ||
121 | <simple name="source" value="src/README"/> | ||
122 | <simple name="target" value="README"/> | ||
123 | <simple name="replaceable" value="true"/> | ||
124 | </element> | ||
125 | </complex-array> | ||
126 | </process> | ||
127 | |||
128 | <process type="org.eclipse.cdt.core.AppendCreate"> | ||
129 | <simple name="projectName" value="$(projectName)"/> | ||
130 | <complex-array name="files"> | ||
131 | <element> | ||
132 | <simple name="source" value="src/Basename.cpp"/> | ||
133 | <simple name="target" value="$(sourceDir)/$(projectName).cpp"/> | ||
134 | <simple name="replaceable" value="true"/> | ||
135 | </element> | ||
136 | </complex-array> | ||
137 | </process> | ||
138 | |||
139 | <process type="org.yocto.sdk.ide.NewYoctoAutotoolsProjectPostProcess"> | ||
140 | <simple name="projectName" value="$(projectName)" /> | ||
141 | </process> | ||
142 | </template> | ||