Commit graph

18 commits

Author SHA1 Message Date
sphere
f97261ae85 Merge branch 'let-mixed-declarations' into 'master'
Remove mixed code and declarations warning

See merge request STJr/SRB2!1618
2021-11-26 13:55:43 +00:00
SteelT
c55e973364 MSYS2: Don't compile with dynamic base
Resolves #671
2021-11-03 17:16:46 -04:00
James R
0ac36b7ce1 Remove mixed code and declarations warning 2021-09-12 19:07:40 -07:00
GoldenTails
1a8ec7975c Makefile: Improve gcc detection
Wasn't working for me until I fixed it.
Turns out gcc really doesn't like giving its name out.
Most of the time it reads argv[0].
2021-08-28 15:39:34 -05:00
James R
22ab611daa Makefile: do not automatically set WINDOWSHELL
According to this answer--
https://stackoverflow.com/a/45952425
--Make will always prefer a unix shell, even on Windows,
if one can be found in Path. So we can't check PATH to
determine if it's a Windows shell... this is just too much
bother.
2021-06-29 16:23:27 -07:00
James R
c1ecfa306f Makefile: 'dep' not 'deps' 2021-06-29 13:58:38 -07:00
James R
ed85e994a4 Remove misplaced parentheses 2021-06-22 15:49:59 -07:00
James R
5f4d7e3c5b Makefile: fail if old build directories exist
After a checkout from before revision, old directories
such as bin/Linux64 only remain if untracked files exist
within. This may be confusing to the user. They may even
use an outdated executable if it is one of those untracked
files.
2021-06-22 15:14:42 -07:00
James R
d5146945a6 Makefile: don't automatically set WINDOWSHELL unless PATH matches Windows norms
This is for MSYS2, which requires unix shell commands.
2021-06-21 16:10:13 -07:00
James R
2d7a8c3c57 Makefile: use shell commands to read in Sourcefile
File function is not supported < Make 4.2.
2021-06-21 14:51:42 -07:00
James R
c325306ddf Merge remote-tracking branch 'origin/master' into makefile-revision-final 2021-06-07 18:36:01 -07:00
James R
9e7d80c2c4 Makefile: suppress DEL error 2021-05-07 16:08:24 -07:00
James R
c06817d008 Makefile: fix mingw/64 swapped with 32-bit 2021-05-07 15:30:46 -07:00
James R
ee72312dea Merge remote-tracking branch 'origin/master' into makefile-revision-final 2021-05-07 13:32:19 -07:00
James R
ec8b63d675 Makefile: remove last of unused flags 2021-05-05 21:21:55 -07:00
James R
3d7205d494 Fix minor errors with Windows ECHO, DEL, MD
- Quotes were not removed by ECHO.
- DEL would print an error on nonexistent file.
- MD would do this plus return a nonzero exit code.
2021-05-04 22:34:20 -07:00
James R
b31056c7d9 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.
2021-05-04 04:22:37 -07:00
James R
44d217807f Collect makefiles 2021-05-03 23:07:44 -07:00