Skip to content

Reorganize project structure #91

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

vacantron
Copy link

@vacantron vacantron commented Aug 2, 2025

  • "3rdparty/": location for submodules
  • "include/": location for headers
  • "build/": location for intermediate files and binaries
  • "src/": location for source codes

Known issue

The submodule mini-gdbstub would install a git hook by default and report an error because it is not at the project's root. I have open an issue for this.

@Mes0903
Copy link
Collaborator

Mes0903 commented Aug 2, 2025

I remember someone mentioned that the current handwritten Makefile might not be able to handle multiple build configurations and rules well before, which could lead to confusion for users. As a result, there was a suggestion to switch to build systems like CMake or Meson. Maybe we could take this opportunity to discuss it as well?

@Cuda-Chen
Copy link
Collaborator

Cuda-Chen commented Aug 3, 2025

Hi @Mes0903 ,

Let me illustrate my thoughts.

As a result, there was a suggestion to switch to build systems like CMake or Meson.

For Meson, I have no any opinions as I haven't write any build configuration using Meson.
For CMake, my opinion is that it is an easy-to-use but hard to maintain as CMake use a DSL for the configuration. What's more, I always have difficulty to integrate any non-CMake projects into a CMake project (the best ways is to write a CMake integration rule).

As you have mention these build tools, I just come up with using ninja, though you may need to take efforts on parallel build (ninja by default uses all CPUs for building, which sometimes starves the other applications).

@Mes0903
Copy link
Collaborator

Mes0903 commented Aug 3, 2025

Hi @Cuda-Chen ,

I agree with your point. The reason I mentioned Meson and CMake is just because I heard someone else suggest them before. Maybe ninja would be a good option.

- "3rdparty/": location for submodules
- "include/": location for headers
- "build/": location for intermediate files and binaries
- "src/": location for source codes
@vacantron
Copy link
Author

As you have mention these build tools, I just come up with using ninja, though you may need to take efforts on parallel build (ninja by default uses all CPUs for building, which sometimes starves the other applications).

IMO, CMake and Menson are the configuration tools. They would scan your environment to resolve the dependencies and generate .make (for GNU Make) or .ninja (for Ninja) for build.

If we are struggling in the configuration, I think that we need an assistant system like Cmake or Meson, instead of the build tools.

@Mes0903
Copy link
Collaborator

Mes0903 commented Aug 10, 2025

LGTM, although the original issue seems to have been resolved by minigdb, I think being able to reorganize project structure is quite nice.

For this PR, I can compile and run it successfully in my Ubuntu environment now, but there’s one problem: it currently have mini-gdbstub pinned at 39020f2… while keeping shallow = true. Since that commit isn’t reachable from the shallow fetch, git submodule update fails on my side.

Copy link
Collaborator

@jserv jserv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebase the latest 'master' branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants