Skip to content
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

Refactor Makefile to put all binaries to use obj and bin #35

Open
ryukinix opened this issue Oct 27, 2020 · 0 comments
Open

Refactor Makefile to put all binaries to use obj and bin #35

ryukinix opened this issue Oct 27, 2020 · 0 comments
Assignees

Comments

@ryukinix
Copy link
Collaborator

Currently our Makefile put the .o and .bin files in the same directory. That could be very confusing when you are using some tree view on a file manager, because it looks very dirty. Take a look:

.
├── assets
│   └── examples
│       └── lena_gray.bmp
├── examples
│   ├── basics
│   │   ├── square-moving.bin
│   │   └── square-moving.cpp
│   ├── collision
│   │   ├── breakout.bin
│   │   ├── breakout.cpp
│   │   ├── square-platform.bin
│   │   └── square-platform.cpp
│   └── gfx
│       ├── colors-test.bin
│       ├── colors-test.cpp
│       ├── psx-doom-fire.bin
│       └── psx-doom-fire.cpp
├── hazard-memory.bin
├── LICENSE
├── Makefile
├── README.md
├── src
│   ├── collider
│   │   ├── ColliderCircle.cpp
│   │   ├── ColliderCircle.hpp
│   │   ├── ColliderCircle.o
│   │   ├── Collider.cpp
│   │   ├── Collider.hpp
│   │   ├── Collider.o
│   │   ├── ColliderRect.cpp
│   │   ├── ColliderRect.hpp
│   │   ├── ColliderRect.o
│   │   ├── ColliderScreen.cpp
│   │   ├── ColliderScreen.hpp
│   │   └── ColliderScreen.o
│   ├── Game.hpp
│   ├── gfx
│   │   └── Circle.hpp
│   ├── InputHandler.hpp
│   ├── main.cpp
│   ├── main.o
│   ├── math
│   │   └── Vector2.hpp
│   └── Ticker.hpp
├── TAGS
└── tests
    ├── TestCollision.bin
    ├── TestCollision.cpp
    ├── TestVector2D.bin
    └── TestVector2D.cpp

11 directories, 39 files

I propose to use two additional folders that are generated automatically and should not be committed (use .gitignore):

  • bin/
  • obj/

The bin folder should contains all the binaries, for instance generation of: executable binaries, shared libraries, static libraries
The obj should contains only .o files: it should preserve the tree structure of the file system to avoid collision.

@ryukinix ryukinix self-assigned this Oct 27, 2020
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

No branches or pull requests

1 participant