Commit Graph

8 Commits

Author SHA1 Message Date
joshua stein
31732d163f Build: Enter Libraries before AK, clean tests as separate step 2020-01-01 22:21:50 +01:00
joshua stein
b916aa3b5a Build: go back to ordering SUBDIRS by their usefulness
The dependency tracking still doesn't need any specific ordering to
build, but it's better to build DevTools and Libraries first so it
doesn't try to build two Applications that each need to wait for
libraries to be built, wasting a make child sitting around trying to
acquire the lock on the library directory.
2019-12-28 21:09:33 +01:00
joshua stein
0b501335f5 Build: wrap make invocations with flock(1)
Lock each directory before entering it so when using -j, the same
dependency isn't built more than once at a time.

This doesn't get full -j parallelism though, since one make child
will be sitting idle waiting for flock to receive its lock and
continue making (which should then do nothing since it will have
been built already).  Unfortunately there's not much that can be
done to fix that since it can't proceed until its dependency is
built by another make process.
2019-12-28 21:09:33 +01:00
Stefano Cristiano
b62dbcbf59 Build: Disable compiling tests on macOS host
Tests fail to compile for a mix of reasons, some due to macOS file systems
being by default case-insensitive and some specific to clang.
Both issues are better left to a dedicated set of PR that addressed them.
2019-12-27 02:19:55 +01:00
joshua stein
ec1db803f0 Build: add explicit 'all' target in root Makefile 2019-12-25 10:11:09 +01:00
joshua stein
c127d16326 Build: support library and generator dependencies
Instead of directly manipulating LDFLAGS, set LIB_DEPS in each
subdirectory Makefile listing the libraries needed for
building/linking such as "LIB_DEPS = Core GUI Draw IPC Core".

This adds each library as an -L and -l argument in LDFLAGS, but
also adds the library.a file as a link dependency on the current
$(PROGRAM).  This causes the given library to be (re)built before
linking the current $(PROGRAM), but will also re-link any binaries
depending on that library when it is modified, when running make
from the root directory.

Also turn generator tools like IPCCompiler into dependencies on the
files they generate, so they are built on-demand when a particular
directory needs them.

This all allows the root Makefile to just list directories and not
care about the order, as all of the dependency tracking will figure
it out.
2019-12-25 10:11:09 +01:00
Andreas Kling
ce6c63b117 Build: Oops, we forgot to build LibM 2019-12-20 21:09:10 +01:00
joshua stein
ac25438d54 Build: clean up build system, use one shared Makefile
Allow everything to be built from the top level directory with just
'make', cleaned with 'make clean', and installed with 'make
install'.  Also support these in any particular subdirectory.

Specifying 'make VERBOSE=1' will print each ld/g++/etc. command as
it runs.

Kernel and early host tools (IPCCompiler, etc.) are built as
object.host.o so that they don't conflict with other things built
with the cross-compiler.
2019-12-20 20:20:54 +01:00