mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 09:42:45 +00:00 
			
		
		
		
	 c127d16326
			
		
	
	
		c127d16326
		
	
	
	
	
		
			
			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.
		
			
				
	
	
		
			12 lines
		
	
	
	
		
			220 B
		
	
	
	
		
			Makefile
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
	
		
			220 B
		
	
	
	
		
			Makefile
		
	
	
	
	
	
| OBJS = \
 | |
|     ManualModel.o \
 | |
|     ManualSectionNode.o \
 | |
|     ManualPageNode.o \
 | |
|     History.o \
 | |
|     main.o
 | |
| 
 | |
| PROGRAM = Help
 | |
| 
 | |
| LIB_DEPS = GUI HTML Draw Markdown IPC Protocol Thread Pthread Core
 | |
| 
 | |
| include ../../Makefile.common
 |