Trying to understand how EDE works by using it to generate Makefiles for
a project directory that contains several targets under a specific
hierarchy. I'm not having any luck, and the info pages don't seem to
answer my question.
My directory structure looks something like:
(The asterix (*) marks files containing main() functions)
research/
flow/
flow.cpp
flow.hpp
program.cpp *
samples/
sample1.yuv
utils/
yuvreader.cpp
yuvreader.hpp
tests/
yuvreader_test.cpp *
I want to create EDE project(s) with one or more subprojects; or maybe I
just want one or more targets...?
flow's program.cpp requires flow/ and utils/ sources, but yuvreader_test
only requires utils/ sources.
I did ede-new in the root directory, and all subdirectories. I also did ede-new-target in the root directory, but when adding source files in subdirectories, it does not recognize the target I created.
I would appreciate it if someone could point me to some more complicated
Project.ede files for something like I'm trying to do. You can guess
that I have more subdirectories containing class code files, some of
which have standalone programs that use that code; also I have more test
code under tests/. Any example files/command workflows would be
appreciated.
The EDE feature that will generate Makefile or Automakefiles has a few more constraints than either Make or Automake. For example, the files belonging to a target must be in the same directory as the project containing the target. In your example, you would probably have no projects in your root directory.
To bring multiple sources together into a single program, a simple mechanism is to have each subdirectory create an archive (.a) or a shared lib (.so) that is linked together in your program.
If that is too constraining, you can also write your own automake files, and EDE will read those directly, so you can have a more complex build procedure as needed.
The CEDET distribution uses EDE as its build process, so you could look at that as a complex example. It doesn't build C++ files though, so it may not be as helpful as you would like.
Related
I have received an entire source archive for a Yocto-build. But I can't figure out how to install it.
The archive is a zip file containing three .tar.xz files with names like machine-name-allarch-poky-linux.tar.xz, where each of these files contain a directory structure like sources/allarch-poky-linux/ followed by many different folders with all different source packages.
The file structure is just like what can be found here:
https://download.automotivelinux.org/AGL/release/lamprey/12.1.0/raspberrypi4/deploy/sources/
As in above, the final directories contain a .tar.gz with all source code etc for each package, and very often there is also a couple of patches and other miscellaneous files.
Probably the archive was created with the archiver class.
But the manual does not say anything about what the user (in this case, me) shall do to install the created archive.
It seems to be related to the DL_DIR, but the file structure doesn't really comply with what the DL_DIR usually contains (only tarballs, no loose patches etc. and the tarballs are not in sub-directories as in the archive).
How do I go about to get Yocto to use these archives?
I have done my first package for Deno, and then I publish it to deno.land/x/.
I would like to know if there is a way to Ignore some files and dires at the time of upload the package, example: [".github",".vim","test_deps.ts"].
Pretty much like .npmignore.
There is not currently a way to ignore files, but if you'd like to only include certain files, you can organize them separately in a subdirectory of your repository, and use that option when publishing your module:
The subdirectory that you choose in this step will become the root of the module's file hierarchy.
I am new in the cmake world and I am not even sure if what I try to achieve is possible or not.
Currently, I have an eclipse project file which contains many targets (they have some files in common, some are different (I used the exclusions in Eclipse to do it)).
One of my colleague uses the CLion for that so he created a CmakeLists.txt files for that. Is it possible to use these CmakeLists.txt files to create a project in eclipse? Is it possible to have this way a multiple targets in one project file?
Is it possible to use these CmakeLists.txt files to create a project in eclipse?
Yes, use the following from your source root to generate Eclipse project files which support in-source builds.
$ cmake -G"Eclipse CDT4 - Unix Makefiles" .
If you want to do out-of-source builds, there are a few wrinkles to be aware of. Have a look at this cmake wiki page about the Eclipse CDT generator for more details.
Note that Eclipse also supports importing projects from existing makefiles, which means you can just use the "Unix Makefile" generator to generate makefiles, and import from those.
See this cmake wiki page for details on that
Is it possible to have this way a multiple targets in one project file?
Yes it is. All targets specified in your CMakeLists.txt file(s) will be included in the generated project file.
Thank you for a quick answer. I looked into what you sent me but my indexing still does not work. In my project I have following structure:
Folder main with main.c
Folder platform with three different folders: folder a with a.c file, folder b with b.c file and folder c.c file, and one platform.h file common for all those files with declaration of function "platform()". The main function calls the function "platform()" from platform.h which definition is different for each target (a, b, and c respectively defined in a.c, b.c and c.c file). When I create the eclipse project I do get the folder called "[Targets]" but the indexing does not work which means it does not show me the function from the proper target.
Is it possible to be able to switch from one target to another with the "hammer" sign?
Many thanks.
I have a large project that is rather heterogenous - different languages and compilers are involved, altogether producing a build with the help of GNU make.
The project folder structure includes:
project
src
haxe --Haxe source code
graphics --Embeddable graphic resources
locale --Locale-specific resources
chinese --Chinese language resources
english --Generic English resources
build
china --Chinese market
debug --Debugging/Testing for developer(s)
release --Release
europe --European market
debug -- ...
release -- ...
All builds are produced by setting up and running 'make'. What I can't decide on is whether these makefiles should be put in 'src' directory as well? I generally consider original material I write by hand to be source code (since by my line of thought it originated from me and not produced by any program from some other input.) and I DO write my makefiles by hand. Another reason I consider this is because ONLY 'src' directory is a Git repository - I don't really need to version track anything else. Do I put all Makefiles into 'src'?
What's currently in your build directory structure? Is that the compiled output?
Intuitively (and I may be coming from a very different development world than you, so "intuitively" is a relative term) when I see a build folder adjoining a src folder, I expect the program's source code to be in the latter and the scripts/tools/etc. needed to build it to be in the former. The scripts (makefiles in this case, though potentially also to include other things) are themselves source code, as you state, but aren't the program's source. The distinction is that one is "what is being built" and the other is "how to build it."
If I understand you correctly, src is what's bound to your source control and build isn't? Under that circumstance, I would probably create a build (or builder or building or something of that nature) under src to house the scripts. It may be slightly unintuitive that it has to climb another folder before producing its output, but it should sit nicely alongside the resource folders you have there already.
Standard practice is to create a Makefile outside your src/ directory, which builds your project and within that src/ directory, another Makefile builds individual modules. That said, I think in your case it is sufficient to keep your Makefile solely in src/ though. I'm not sure if this applies, but you might want to look at the GNU autoconf package, it's used for exactly this type of thing.
We are using Eclipse+CDT+SVN(Linux). How can we have some common header files in a separate include directory, which is also in the SVN, but not in the project specific subdirectory.
The main goal would be to create some common, reusable code for multiple projects and to be able to easily edit/commit that code within eclipse.
We have different directoy structures on the machines, so "simple" links would not work out.
You could use:
an external project (as suggested by Rahul in the comments of your question) with those header files in it: your first project would "depend on" your second one.
The problem is the path of the common project which can be different from machine to machine, while still being stored in full in the .classpath or .project of your CDT project.
a linked directory, which at least use a path variable for linked resources, and would only require to set that variable to the proper path (to the common project) depending on the current machine.