mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:26:05 +00:00 
			
		
		
		
	Try to figure out if we are using gcc 4 and get rid of the stupid warning, while not breaking 3.x and 2.x...
This commit is contained in:
		
							
								
								
									
										11
									
								
								GNUmakefile
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								GNUmakefile
									
									
									
									
									
								
							@@ -1,4 +1,4 @@
 | 
			
		||||
# $Id: GNUmakefile,v 1.98 2009-05-13 23:43:27 nicm Exp $
 | 
			
		||||
# $Id: GNUmakefile,v 1.99 2009-05-14 00:06:59 nicm Exp $
 | 
			
		||||
 | 
			
		||||
.PHONY: clean
 | 
			
		||||
 | 
			
		||||
@@ -8,10 +8,17 @@ FDEBUG= 1
 | 
			
		||||
 | 
			
		||||
CC?= gcc
 | 
			
		||||
CFLAGS+= -DBUILD="\"$(VERSION)\""
 | 
			
		||||
CPPFLAGS:= -I. -I- $(CPPFLAGS)
 | 
			
		||||
LDFLAGS+= -L/usr/local/lib
 | 
			
		||||
LIBS+= -lncurses
 | 
			
		||||
 | 
			
		||||
# This sort of sucks but gets rid of the stupid warning and should work on
 | 
			
		||||
# most platforms...
 | 
			
		||||
ifeq ($(shell ($(CC) -v 2>&1|awk '/gcc version 4/ { print $0 }') || true), )
 | 
			
		||||
CPPFLAGS:= -I. -I- $(CPPFLAGS)
 | 
			
		||||
else
 | 
			
		||||
CPPFLAGS:= -iquote. $(CPPFLAGS)
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifdef FDEBUG
 | 
			
		||||
LDFLAGS+= -rdynamic
 | 
			
		||||
CFLAGS+= -g -ggdb -DDEBUG
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user