Rewrite Makefile to be modular as well as more automated
Some key points for programmers: - Source code files are mostly listed in a 'Sourcefile'. So you no longer directly edit the object list. There can be multiple Sourcefiles and they can even live in subdirectories--the directory name will be prepended to every filename in the list. Of course, the Makefile still needs to be edited to read from each Sourcefile. - Different rules are no longer required for source code files that live in subdirectories (such as sdl/ or hardware/). Subdirectories Just Work so go ham! In addition to those points, another important change is that the bin directory is no longer divided into platform subdirectories (Linux64, Mingw, etc). Executables now go directly into bin. If you use DEBUGMODE or target 64-bit, then subdirectories for 'debug' and '64' will be made though. Oh by the way, I don't think make clean actually removed files before on Windows. It should now. I also fixed as many little inconsistencies like that as I noticed. And now just an overview of the technical aspects that shouldn't affect anyone who doesn't REALLY care about the Makefile... objs and dep directories have been moved to a make directory. Makefile.cfg and its variants have been moved out of their various subdirectories to src/Makefile.d make distclean removes the bin and make directories entirely, but make clean and cleandep still only affect the current build target. When I say automation, I mean that a lot of copy pasting in the Makefile has been reduced.
parent
f637e28d
No related branches found
No related tags found
Showing
- .gitignore 2 additions, 2 deletions.gitignore
- CMakeLists.txt 1 addition, 1 deletionCMakeLists.txt
- src/Makefile 296 additions, 711 deletionssrc/Makefile
- src/Makefile.d/detect.mk 104 additions, 0 deletionssrc/Makefile.d/detect.mk
- src/Makefile.d/features.mk 76 additions, 0 deletionssrc/Makefile.d/features.mk
- src/Makefile.d/lua.mk 0 additions, 51 deletionssrc/Makefile.d/lua.mk
- src/Makefile.d/nix.mk 28 additions, 62 deletionssrc/Makefile.d/nix.mk
- src/Makefile.d/platform.mk 67 additions, 0 deletionssrc/Makefile.d/platform.mk
- src/Makefile.d/sdl.mk 63 additions, 90 deletionssrc/Makefile.d/sdl.mk
- src/Makefile.d/util.mk 89 additions, 0 deletionssrc/Makefile.d/util.mk
- src/Makefile.d/versions.mk 37 additions, 338 deletionssrc/Makefile.d/versions.mk
- src/Makefile.d/win32.mk 70 additions, 107 deletionssrc/Makefile.d/win32.mk
- src/Sourcefile 87 additions, 0 deletionssrc/Sourcefile
- src/blua/Sourcefile 25 additions, 0 deletionssrc/blua/Sourcefile
- src/hardware/Sourcefile 13 additions, 0 deletionssrc/hardware/Sourcefile
- src/sdl/Sourcefile 7 additions, 0 deletionssrc/sdl/Sourcefile
Loading
Please register or sign in to comment