mirror of
				https://github.com/Zygo/bees.git
				synced 2025-10-26 07:42:53 +01:00 
			
		
		
		
	We can remove the explicit depend on the .h file because that is covered by depends.mk. Let's instead depend on makeflags which makes more sense. Signed-off-by: Kai Krakow <kai@kaishome.de>
		
			
				
	
	
		
			39 lines
		
	
	
		
			780 B
		
	
	
	
		
			Makefile
		
	
	
	
	
	
			
		
		
	
	
			39 lines
		
	
	
		
			780 B
		
	
	
	
		
			Makefile
		
	
	
	
	
	
| TAG := $(shell git describe --always --dirty || echo UNKNOWN)
 | |
| 
 | |
| default: libcrucible.so
 | |
| 
 | |
| OBJS = \
 | |
| 	chatter.o \
 | |
| 	cleanup.o \
 | |
| 	crc64.o \
 | |
| 	error.o \
 | |
| 	extentwalker.o \
 | |
| 	fd.o \
 | |
| 	fs.o \
 | |
| 	ntoa.o \
 | |
| 	path.o \
 | |
| 	process.o \
 | |
| 	string.o \
 | |
| 	task.o \
 | |
| 	time.o \
 | |
| 	uuid.o \
 | |
| 	.version.o \
 | |
| 
 | |
| include ../makeflags
 | |
| 
 | |
| depends.mk: *.cc
 | |
| 	for x in *.cc; do $(CXX) $(CXXFLAGS) -M "$$x"; done > depends.mk.new
 | |
| 	mv -fv depends.mk.new depends.mk
 | |
| 
 | |
| .version.cc: Makefile ../makeflags *.cc ../include/crucible/*.h
 | |
| 	echo "namespace crucible { const char *VERSION = \"$(TAG)\"; }" > .version.new.cc
 | |
| 	mv -f .version.new.cc .version.cc
 | |
| 
 | |
| include depends.mk
 | |
| 
 | |
| %.o: %.cc ../makeflags
 | |
| 	$(CXX) $(CXXFLAGS) -fPIC -o $@ -c $<
 | |
| 
 | |
| libcrucible.so: $(OBJS) Makefile
 | |
| 	$(CXX) $(LDFLAGS) -fPIC -o $@ $(OBJS) -shared -Wl,-soname,$@ -luuid
 |