mirror of
				https://github.com/Zygo/bees.git
				synced 2025-11-03 19:50:34 +01:00 
			
		
		
		
	src: simplify Makefile
Make can build dependencies in parallel, so let Make do that. Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
		
							
								
								
									
										11
									
								
								src/Makefile
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								src/Makefile
									
									
									
									
									
								
							@@ -28,17 +28,10 @@ bees-usage.c: bees-usage.txt Makefile
 | 
			
		||||
	(echo 'const char *BEES_USAGE = '; sed -r 's/^(.*)$$/"\1\\n"/' < bees-usage.txt; echo ';') > bees-usage.new.c
 | 
			
		||||
	mv -f bees-usage.new.c bees-usage.c
 | 
			
		||||
 | 
			
		||||
.depends:
 | 
			
		||||
	mkdir -p $@
 | 
			
		||||
 | 
			
		||||
.depends/%.dep: %.cc Makefile | .depends
 | 
			
		||||
%.dep: %.cc Makefile
 | 
			
		||||
	$(CXX) $(BEES_CXXFLAGS) -M -MF $@ -MT $(<:.cc=.o) $<
 | 
			
		||||
 | 
			
		||||
depends.mk: $(ALL_OBJS:%.o=.depends/%.dep)
 | 
			
		||||
	cat $^ > $@.new
 | 
			
		||||
	mv -f $@.new $@
 | 
			
		||||
 | 
			
		||||
include depends.mk
 | 
			
		||||
include $(ALL_OBJS:%.o=%.dep)
 | 
			
		||||
 | 
			
		||||
%.o: %.c ../makeflags
 | 
			
		||||
	$(CC) $(BEES_CFLAGS) -o $@ -c $<
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user