Cppmake 0.5
Sponsored Links
Cppmake 0.5 Ranking & Summary
File size:
0.013 MB
Platform:
Any Platform
License:
GPL (GNU General Public License)
Price:
Downloads:
1088
Date added:
2006-11-05
Publisher:
Bitwiser Labs
Cppmake 0.5 description
Cppmake application is a front-end to make that builds C++ programs with less effort than writing makefiles manually.
Building a C++ program with cppmake is similar to compiling a Java program. The idea is that you specify a classpath and cppmake will automatically find all the classes needed by your program. Once found, all of the classes are compiled and linked into an executable or library.
The benefits of using cppmake to build C++ programs include
- You dont have to write a makefile when you start a new project
- You dont have to maintain a makefile as your project evolves
- Header file dependencies are automatically kept up to date
- You can switch from one implementation of a group of classes to another on the fly by simply changing the classpath
Lets begin with an example. Suppose you want to build a program called joe and the main function is in joe.cpp. Your programs classes live in the current directory, ../../common, and /usr/src/base. The only thing you need to do is set the classpath (just like a java program) to ".:../../common:/usr/src/base" (unix/cygwin) or ".;....common;C:usrsrcbase" (windows). This tells cppmake to first search for classes in the current directory, then in ../../common and finally in /usr/src/base. You simply run cppmake on joe.cpp to build the executable.
$ cppmake --classpath ".:../../common:/usr/src/base" joe.cpp
The result of this command is an executable called joe. Cppmake figures out which classes on the classpath need to be included in the executable and defers the work of actually compiling and linking the executable to the make command. Therefore the next time you run cppmake, only files that need to be recompiled are recompiled.
Now lets do a more complicated example. Suppose you want to build the same program as in the previous example, but this time you want more control over the build. You want to explicitly name the executable joe.exe, you want output files to go in a directory called build, you want to specify the compiler as g++, you want to pass the -Wall -g compiler flags, and you want to link with the pthread library.
$ cppmake --classpath ".:../../common:/usr/src/base" -o joe.exe -d build -x g++ -f "-Wall -g" -l "-lpthread" joe.cpp
Most of these options can be given through environment variables as well as the command line. The following is equivalent to the previous example using bash.
$ export CLASSPATH=".:../../common:/usr/src/base"
$ export OUTPUT=joe.exe
$ export DIRECTORY=build
$ export CXX=g++
$ export CXXFLAGS="-Wall -g"
$ export LDFLAGS="-lpthread"
$ export CPPFILES="joe.cpp"
$ cppmake
When an option is given by both an environment variable and the command line, the command line option takes precedence. One exception to this rule is that C++ files can be given with the CPPFILES environment variable and the command line at the same time.
Cppmake can also be used to build libraries. The difference between building a library and an executable is that when building an executable you only want classes that are needed by the executable, but when you build a library you want all the C++ files on the classpath.
The --library option tells cppmake to include every C++ file found on the classpath in the build. You also have to pass your compiler specific linker options to build a library, cppmake will not know to give those options automatically because they are compiler specific. The following example creates a library on linux assuming CLASSPATH has already been set as in the previous example.
$ cppmake --library -o libjoe.so.1.1.1 -l"-shared -Wl-soname,libjoe.so.1"
The --clean option tells cppmake to remove all the object files and the output. The --help option prints a summary of all the options and exits.
Building a C++ program with cppmake is similar to compiling a Java program. The idea is that you specify a classpath and cppmake will automatically find all the classes needed by your program. Once found, all of the classes are compiled and linked into an executable or library.
The benefits of using cppmake to build C++ programs include
- You dont have to write a makefile when you start a new project
- You dont have to maintain a makefile as your project evolves
- Header file dependencies are automatically kept up to date
- You can switch from one implementation of a group of classes to another on the fly by simply changing the classpath
Lets begin with an example. Suppose you want to build a program called joe and the main function is in joe.cpp. Your programs classes live in the current directory, ../../common, and /usr/src/base. The only thing you need to do is set the classpath (just like a java program) to ".:../../common:/usr/src/base" (unix/cygwin) or ".;....common;C:usrsrcbase" (windows). This tells cppmake to first search for classes in the current directory, then in ../../common and finally in /usr/src/base. You simply run cppmake on joe.cpp to build the executable.
$ cppmake --classpath ".:../../common:/usr/src/base" joe.cpp
The result of this command is an executable called joe. Cppmake figures out which classes on the classpath need to be included in the executable and defers the work of actually compiling and linking the executable to the make command. Therefore the next time you run cppmake, only files that need to be recompiled are recompiled.
Now lets do a more complicated example. Suppose you want to build the same program as in the previous example, but this time you want more control over the build. You want to explicitly name the executable joe.exe, you want output files to go in a directory called build, you want to specify the compiler as g++, you want to pass the -Wall -g compiler flags, and you want to link with the pthread library.
$ cppmake --classpath ".:../../common:/usr/src/base" -o joe.exe -d build -x g++ -f "-Wall -g" -l "-lpthread" joe.cpp
Most of these options can be given through environment variables as well as the command line. The following is equivalent to the previous example using bash.
$ export CLASSPATH=".:../../common:/usr/src/base"
$ export OUTPUT=joe.exe
$ export DIRECTORY=build
$ export CXX=g++
$ export CXXFLAGS="-Wall -g"
$ export LDFLAGS="-lpthread"
$ export CPPFILES="joe.cpp"
$ cppmake
When an option is given by both an environment variable and the command line, the command line option takes precedence. One exception to this rule is that C++ files can be given with the CPPFILES environment variable and the command line at the same time.
Cppmake can also be used to build libraries. The difference between building a library and an executable is that when building an executable you only want classes that are needed by the executable, but when you build a library you want all the C++ files on the classpath.
The --library option tells cppmake to include every C++ file found on the classpath in the build. You also have to pass your compiler specific linker options to build a library, cppmake will not know to give those options automatically because they are compiler specific. The following example creates a library on linux assuming CLASSPATH has already been set as in the previous example.
$ cppmake --library -o libjoe.so.1.1.1 -l"-shared -Wl-soname,libjoe.so.1"
The --clean option tells cppmake to remove all the object files and the output. The --help option prints a summary of all the options and exits.
Cppmake 0.5 Screenshot
Cppmake 0.5 Keywords
Cppmake 0.5
less effort than
to build
c++ programs
writing makefiles
To make
Less Effort
command line
Cppmake
build
C++
executable
Classpath
classes
Cppmake 0.5
Compilers
Bookmark Cppmake 0.5
Cppmake 0.5 Copyright
WareSeeker periodically updates pricing and software information of Cppmake 0.5 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Cppmake 0.5 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed
Featured Software
Want to place your software product here?
Please contact us for consideration.
Contact WareSeeker.com
Related Information
how to build a deck
how to build a website
how to build a dog house
how to build a catapult
how to build a bar
building
executable sermon outlines
java classpath
career builder
executable files
executable code
build a bear ville
build a bear
executable outlines
classpathxmlapplicationcontext
to make new id
command line options
builders exchange
Version History
Related Software
ChMagick is a Ch binding to the ImageMagick C library. Free Download
pyrfeed project is a RSS/Atom Reader and Framework. Free Download
Z80~Ex is a portable ZiLOG Z80 CPU emulator designed as a library. Free Download
VLevel is a dynamic compressor that amplifies the quiet parts of music. Free Download
Parrot::Pmc2c is a PMC to C Code Generation. Free Download
Jendela is a command line tool for controlling windows. Free Download
Edastro places ever changing astrology charts for current time on your desktop. Free Download
C/Invoke is a library for connecting to C libraries at runtime. Free Download
Latest Software
Popular Software
Favourite Software