-
Notifications
You must be signed in to change notification settings - Fork 162
Reorganize project structure for better maintainability in multi-platform support #246
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
base: master
Are you sure you want to change the base?
Conversation
|
Could you update Section Files of the README file to reflect the new folder organization? |
AltraMayor
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update Makefile for out-of-tree build
| extra: $(EXTRA_TARGETS) | ||
| # --- Output Directory Setup --- | ||
| BUILD_DIR := build | ||
| BIN_DIR := $(BUILD_DIR)/bin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new binaries' location breaks the GitHub workflow. Please update the workflow file .github/workflows/test.yml.
| $(UNLINK) $(DESTDIR)$(PREFIX)/share/man/man1/f3write.1 | ||
|
|
||
| uninstall-extra: | ||
| cd $(DESTDIR)$(PREFIX)/bin ; rm $(EXTRA_TARGETS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After the changes, have you tested the targets uninstall and uninstall-extra?
AltraMayor
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move files to new folder structure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now, libflow.c is only used in f3write and f3read, but the goal is to eventually use it in f3brew as well. See my comment here for more context. With this proposed change, how could libflow.c be shared between f3 and f3-extra?
This PR reorganizes the f3 project structure to prepare for future multi-platform support. All changes are purely structural - no functional modifications have been made to the core logic.
Motivation
The current flat directory structure makes it difficult to:
Key Changes:
Directory Reorganization
src/f3/- Core utilities (f3read, f3write) and their shared librariessrc/f3-extra/- Platform-specific tools (f3probe, f3fix, f3brew) and their librariesinclude/f3/- All header files consolidated for cleaner package structurescripts/- Utility scripts moved to dedicated directoryBuild System Updates
Out-of-tree builds: All build artifacts now go into a
build/directory. This can help when cross-compiling and developing or building multiple architectures at once. Also useful for CI/CD to build multiple platforms in parallel.Testing
make -n allshows correct compilation commandsmake -n extrashows correct linking for platform-specific toolsThis PR is a preparatory step for upcoming changes, particularly the introduction of platform-specific implementations. By separating concerns and establishing a clear hierarchy now, subsequent pull requests can focus on specific functionalities without being burdened by structural changes to the overall project structure.