mirror of
				https://git.proxmox.com/git/mirror_frr
				synced 2025-11-04 11:45:06 +00:00 
			
		
		
		
	This provides the first reasonably-working version of the frr-format GCC plugin. I've only tested it with gcc 9.3.0. Signed-off-by: David Lamparter <equinox@diac24.net>
		
			
				
	
	
		
			20 lines
		
	
	
		
			441 B
		
	
	
	
		
			Makefile
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			441 B
		
	
	
	
		
			Makefile
		
	
	
	
	
	
all: frr-format.so
 | 
						|
 | 
						|
CXX=g++-9
 | 
						|
 | 
						|
PLUGBASE=`$(CXX) -print-file-name=plugin`
 | 
						|
CPPFLAGS=-I$(PLUGBASE)/include -I$(PLUGBASE)/include/c-family
 | 
						|
 | 
						|
frr-format.so: frr-format.o
 | 
						|
	$(CXX) -g -shared -o $@ $^
 | 
						|
 | 
						|
frr-format.o: frr-format.c gcc-common.h
 | 
						|
	$(CXX) -g $(CPPFLAGS) -fPIC -Wall -Wextra -Wno-unused-parameter -c -o $@ $<
 | 
						|
 | 
						|
install:
 | 
						|
	install -d $(DESTDIR)$(PLUGBASE)
 | 
						|
	install frr-format.so $(DESTDIR)$(PLUGBASE)
 | 
						|
 | 
						|
clean:
 | 
						|
	rm -f frr-format.so frr-format.o
 |