Commit graph

157 commits

Author SHA1 Message Date
James R
824b1ab28c Makefile: use full stem in dependency generation
Previously took only the filename, so the directory
component was stripped. This broke dependencies for
basically every file.
2021-08-14 15:29:21 -07:00
James R
abdf5c101c Makefile: report SHELL 2021-06-29 16:22:46 -07:00
James R
6c03f9b5b3 fuck 2021-06-29 14:42:40 -07:00
James R
c3ad5de912 Makefile: let variables be defined on Make line
If a variable is defined as in 'make CC=gcc-10', then that
definition overrides anything other definition in the
Makefile.
2021-06-22 15:47:48 -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
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
b04c79d8a7 Say 'at' 2021-06-16 16:58:47 -07:00
James R
c142b3241d Makefile: alert full path of final executable
With added textual contrast.
2021-06-16 16:26:17 -07:00
James R
3a044e71cc Disable EXE disassembly and compression by default
NOOBJDUMP=1 and NOUPX=1 have been removed. Make 'dump'
target to disassemble. UPX=upx to compress executable.

Setting UPX used to cause it to fail. That has been fixed.
2021-06-16 15:39:23 -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
888073d64d Fix make clean printing header 2021-05-04 16:54:47 -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
e39bf7503f Makefile: fix object file not depending on headers
BRUH MOMENT
2021-04-06 03:55:57 -07:00
James R
5f4e21ed3a Fix dependency file trying to be made for SRB2.res and not for interface/blua/hardware files 2021-02-28 17:02:08 -08:00
James R
747c278bc2 Makefile: add a SILENT flag
This makes it print nothing to stdout.

Also fixed some irregularities.
2021-02-18 07:24:20 -08:00
James R
3d32f3145c Generate individual dependency files
This removes Makefile.depends. Instead, '.d' files are included from the 'dep'
directory. This speeds up building because dependencies for every file don't
need to be regenerated if only one changes.

As a bonus, dependencies also won't be generated if only clean type targets
are going to be run. Also added a 'distclean' target, which cleans both
objects and dependency files.
2021-02-18 06:23:18 -08:00
James R
3003c252d1 Makfile: don't print some messages twice 2021-02-18 06:23:12 -08:00
James R
b2a84a9376 Merge remote-tracking branch 'origin/master' into no-dd-make 2020-11-22 14:14:43 -08:00
GoldenTails
e3c6d1cef3 Add NOECHOFILENAMES, if people don't want logspam. 2020-11-21 22:21:18 -06:00
James R
79bbb3fe46 Remove Direct Draw from the Makefiles
MINGW/MINGW64 implies SDL.
2020-11-21 15:19:54 -08:00
GoldenTails
8cfa21fb20 Echo filenames when compiling without ECHO=1 2020-11-19 15:17:56 -06:00
Hannu Hanhi
244c76250f Use SSE3 in 32-bit x86 binaries 2020-10-25 00:08:24 +03:00
GoldenTails
94f6d0b002 Fix gzip failing to compress SRB2's objdump on non-Windows. 2020-10-12 16:59:47 -05:00
SteelT
a033f482be Merge branch 'pictureformats' into 'next'
PNG conversion refactoring

See merge request STJr/SRB2!675
2020-09-10 15:58:18 -04:00
James R
b2226e95d6 Merge branch 'master' into next 2020-08-31 16:10:05 -07:00
James R
6c2370f894 Kill NOHS
(cherry picked from commit 3437b0690a3f4278e3ecc657102a126a3e2f3d13)
2020-08-31 16:06:40 -07:00
James R
37c647c00e Merge remote-tracking branch 'origin/master' into next 2020-08-28 19:52:25 -07:00
James R
8d9b16df8c Merge branch 'makefile-detect-system' into 'master'
Detect which system the Makefile is running on to compile for

See merge request STJr/SRB2!1123
2020-08-28 22:49:34 -04:00
James R
6f51c68c72 Makefile: add WINDOWSHELL=1 for the Windows detect 2020-08-20 20:19:50 -07:00
James R
f92026f98b Makefile: automatically detect system to compile for, if no system was specified
This should work for mingw and linux so far.
2020-08-18 18:01:59 -07:00
James R
9495e6354f Makefile: Make WARNINGMODE the default, optionally disable with RELAXWARNINGS 2020-08-18 16:45:00 -07:00
James R
a808294c0c Merge branch 'kill-cd-support' into 'next'
Kill CD support

See merge request STJr/SRB2!1102
2020-08-09 20:48:25 -04:00
James R
23f218117c Merge branch 'http-mserv' into 'next'
HTTP Based Master Server + Multithreading

See merge request STJr/SRB2!940
2020-08-09 20:24:26 -04:00
Steel Titanium
dff0e87e03 Kill CD support 2020-08-07 17:06:19 -04:00
Steel Titanium
0d48d4c833 WIP: Remove support for DOS
WIP because I don't know if this wording is right for the error.
2020-07-25 18:55:51 -04:00
Jaime Passos
ca060a4372 Merge branch 'next' of https://git.magicalgirl.moe/STJr/SRB2 into pictureformats 2020-07-21 22:25:00 -03:00
James R
93615b07be Merge remote-tracking branch 'origin/next' into http-mserv 2020-07-13 08:58:43 -07:00
James R
b9a24001d8 Merge remote-tracking branch 'origin/next' into remove-glide-2 2020-07-12 16:05:15 -07:00
James R
479bbeacbe Merge remote-tracking branch 'origin/next' into http-mserv 2020-07-11 17:41:46 -07:00
Jaime Passos
7911deebf8 Merge branch 'next' of https://git.magicalgirl.moe/STJr/SRB2 into pictureformats 2020-07-06 19:29:14 -03:00
Jaime Passos
4f6420274f Remove Software tricks 2020-07-06 01:26:56 -03:00
Jaime Passos
abeedc4b65 Delete hw_glide.h 2020-07-06 00:27:34 -03:00
Hannu Hanhi
abe13651d0 OpenGL draw call batching system 2020-06-07 21:20:52 +03:00
Hannu Hanhi
da98ea242e Merge remote-tracking branch 'upstream/next' into shaders-224-next-merge 2020-06-07 20:01:05 +03:00
Jaime Passos
1a79f6246d Merge remote-tracking branch 'origin/next' into pictureformats 2020-05-15 01:34:54 -03:00
James R
57c7df74d9 Rename hms123311.c to http-mserv.c
HMS lives on in our hearts!

(cherry picked from commit e8a2397deaacdd7dc6f80717755bc89161247cb5)
2020-05-14 17:28:55 -07:00
Steel Titanium
ff8987f745 Support for http downloads
(cherry picked from commit 6fcc06bf72cf3b95c30f04919e807c7aaacec68d)

(cherry picked just the libcurl stuff)
2020-05-13 17:25:52 -07:00
James R
06da1425b3 The big bad HTTP master server
Cvars:

http_masterserver is the url to the master server's API.
masterserver_token may be an authentication token.
2020-05-13 17:18:26 -07:00
James R
fe9b933b97 Merge remote-tracking branch 'origin/master' into HEAD 2020-04-24 22:10:59 -07:00
Monster Iestyn
7a585e2498 Merge branch 'next' into demos-refactor
# Conflicts:
#	src/g_game.c

(also update g_demo.c)
2020-03-20 17:48:31 +00:00