diff options
author | joshua stein <jcs@jcs.org> | 2019-12-24 20:36:04 -0600 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-12-25 10:11:09 +0100 |
commit | c127d1632679823d2cfe873895fad72aa52cfc87 (patch) | |
tree | bcfc370f214955e90c2a8f9891a187af5a042eaa /Servers/WindowServer/Makefile | |
parent | 2aeae2aea9a289e3e9ba96444e44169dd78cc1cb (diff) | |
download | serenity-c127d1632679823d2cfe873895fad72aa52cfc87.zip |
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.
Diffstat (limited to 'Servers/WindowServer/Makefile')
-rw-r--r-- | Servers/WindowServer/Makefile | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Servers/WindowServer/Makefile b/Servers/WindowServer/Makefile index 6dcb3fec6a..508c7de1bd 100644 --- a/Servers/WindowServer/Makefile +++ b/Servers/WindowServer/Makefile @@ -18,14 +18,14 @@ OBJS = \ PROGRAM = WindowServer -LDFLAGS = -lc -ldraw -lcore -lthread -lpthread -lipc +LIB_DEPS = Draw Core Thread Pthread IPC *.cpp: WindowServerEndpoint.h WindowClientEndpoint.h -WindowServerEndpoint.h: WindowServer.ipc +WindowServerEndpoint.h: WindowServer.ipc IPCCOMPILER @echo "IPC $<"; $(IPCCOMPILER) $< > $@ -WindowClientEndpoint.h: WindowClient.ipc +WindowClientEndpoint.h: WindowClient.ipc IPCCOMPILER @echo "IPC $<"; $(IPCCOMPILER) $< > $@ EXTRA_CLEAN = WindowServerEndpoint.h WindowClientEndpoint.h |