mirror of
				https://github.com/Zygo/bees.git
				synced 2025-11-04 04:00:36 +01:00 
			
		
		
		
	libcrucible at one time in the distant past had to be a shared library to force global C++ object initialization; however, this is no longer required. Make libcrucible static to solve various rpath and soname versioning issues, especially when distros try (unwisely) to package the library separately. Signed-off-by: Zygo Blaxell <bees@furryterror.org>
		
			
				
	
	
		
			44 lines
		
	
	
		
			779 B
		
	
	
	
		
			Makefile
		
	
	
	
	
	
			
		
		
	
	
			44 lines
		
	
	
		
			779 B
		
	
	
	
		
			Makefile
		
	
	
	
	
	
PROGRAMS = \
 | 
						|
	chatter \
 | 
						|
	crc64 \
 | 
						|
	fd \
 | 
						|
	limits \
 | 
						|
	path \
 | 
						|
	process \
 | 
						|
	progress \
 | 
						|
	task \
 | 
						|
 | 
						|
all: test
 | 
						|
 | 
						|
test: $(PROGRAMS:%=%.txt) Makefile
 | 
						|
FORCE:
 | 
						|
 | 
						|
include ../makeflags
 | 
						|
 | 
						|
LIBS = -lcrucible -lpthread
 | 
						|
BEES_LDFLAGS = -L../lib $(LDFLAGS)
 | 
						|
 | 
						|
.depends:
 | 
						|
	mkdir -p $@
 | 
						|
 | 
						|
.depends/%.dep: %.cc tests.h Makefile | .depends
 | 
						|
	$(CXX) $(BEES_CXXFLAGS) -M -MF $@ -MT $(<:.cc=.o) $<
 | 
						|
 | 
						|
depends.mk: $(PROGRAMS:%=.depends/%.dep)
 | 
						|
	cat $^ > $@.new
 | 
						|
	mv -f $@.new $@
 | 
						|
 | 
						|
include depends.mk
 | 
						|
 | 
						|
$(PROGRAMS:%=%.o): %.o: %.cc ../makeflags Makefile
 | 
						|
	$(CXX) $(BEES_CXXFLAGS) -o $@ -c $<
 | 
						|
 | 
						|
$(PROGRAMS): %: %.o ../makeflags Makefile
 | 
						|
	$(CXX) $(BEES_CXXFLAGS) $(BEES_LDFLAGS) -o $@ $< $(LIBS)
 | 
						|
 | 
						|
%.txt: % Makefile FORCE
 | 
						|
	./$< >$@ 2>&1 || (RC=$$?; cat $@; exit $$RC)
 | 
						|
 | 
						|
clean:
 | 
						|
	rm -fv $(PROGRAMS:%=%.o) $(PROGRAMS:%=%.txt) $(PROGRAMS)
 |