You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							22 lines
						
					
					
						
							435 B
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							22 lines
						
					
					
						
							435 B
						
					
					
				
								CXXFLAGS := -std=c++20 -O2 -Wall -Wextra
							 | 
						|
								
							 | 
						|
								sources := $(wildcard *.cc)
							 | 
						|
								progs := $(patsubst %.cc,%,$(sources))
							 | 
						|
								
							 | 
						|
								.PHONY: all
							 | 
						|
								all: $(progs)
							 | 
						|
								
							 | 
						|
								.PHONY: clean
							 | 
						|
								clean:
							 | 
						|
									rm -f $(progs) $(progs:=_test.txt)
							 | 
						|
								
							 | 
						|
								.PHONY: test
							 | 
						|
								test: $(addprefix test-,$(progs))
							 | 
						|
								
							 | 
						|
								.PHONY: test-%
							 | 
						|
								test-%: %_test.txt
							 | 
						|
									@test -f $*_output.txt && (diff -u $*_output.txt $<; rm -f $<)
							 | 
						|
									@test -f $*_output.txt || cat $<
							 | 
						|
								
							 | 
						|
								$(progs:=_test.txt): %_test.txt: %
							 | 
						|
									./$< $*_input.txt > $@
							 | 
						|
								
							 |