mirror of
				https://github.com/Zygo/bees.git
				synced 2025-11-04 04:00:36 +01:00 
			
		
		
		
	Tests could now be run in parallel. Additionally, single tests can be run by simply using "make testname", i.e. "make chatter" would run the chatter test. Signed-off-by: Kai Krakow <kai@kaishome.de>
		
			
				
	
	
		
			40 lines
		
	
	
		
			700 B
		
	
	
	
		
			Makefile
		
	
	
	
	
	
			
		
		
	
	
			40 lines
		
	
	
		
			700 B
		
	
	
	
		
			Makefile
		
	
	
	
	
	
PROGRAMS = \
 | 
						|
	chatter \
 | 
						|
	crc64 \
 | 
						|
	fd \
 | 
						|
	limits \
 | 
						|
	path \
 | 
						|
	process \
 | 
						|
	task \
 | 
						|
 | 
						|
all: test
 | 
						|
 | 
						|
test: $(PROGRAMS) Makefile
 | 
						|
 | 
						|
include ../makeflags
 | 
						|
 | 
						|
LIBS = -lcrucible -lpthread
 | 
						|
LDFLAGS = -L../lib -Wl,-rpath=$(shell realpath ../lib)
 | 
						|
 | 
						|
.depends/%.dep: %.cc tests.h Makefile
 | 
						|
	@mkdir -p .depends
 | 
						|
	$(CXX) $(CXXFLAGS) -M -MF $@ -MT $(<:.cc=.o) $<
 | 
						|
 | 
						|
depends.mk: $(PROGRAMS:%=.depends/%.dep)
 | 
						|
	cat $^ > $@.new
 | 
						|
	mv -f $@.new $@
 | 
						|
 | 
						|
include depends.mk
 | 
						|
 | 
						|
%.o: %.cc %.h ../makeflags Makefile
 | 
						|
	@echo "Implicit rule %.o: %.cc"
 | 
						|
	$(CXX) $(CXXFLAGS) -o $@ -c $<
 | 
						|
 | 
						|
$(PROGRAMS): %: %.o ../makeflags Makefile
 | 
						|
	@echo "Implicit rule %: %.o"
 | 
						|
	$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)
 | 
						|
	./$@
 | 
						|
 | 
						|
clean:
 | 
						|
	rm -fv $(PROGRAMS:%=%.o) $(PROGRAMS)
 |