only add libxdg-basedir as dependency when needed
This commit is contained in:
		
							parent
							
								
									d03344803d
								
							
						
					
					
						commit
						14d59c4d0c
					
				
							
								
								
									
										19
									
								
								config.mk
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								config.mk
									
									
									
									
									
								
							| @ -25,17 +25,22 @@ ifeq (${PKG_CONFIG}, ${EMPTY}) | |||||||
| 	$(error "Failed to find pkg-config, please make sure it is installed") | 	$(error "Failed to find pkg-config, please make sure it is installed") | ||||||
| endif | endif | ||||||
| 
 | 
 | ||||||
| pkg_config_packs:="dbus-1 libxdg-basedir x11 freetype2 xext xft xscrnsaver glib-2.0 gio-2.0 pango cairo pangocairo" | # flags
 | ||||||
|  | CPPFLAGS += -D_BSD_SOURCE -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS} ${INIFLAGS} | ||||||
|  | CFLAGS   += -g --std=c99 -pedantic -Wall -Wno-overlength-strings -Os ${STATIC} ${CPPFLAGS} ${EXTRACFLAGS} | ||||||
|  | 
 | ||||||
|  | pkg_config_packs:="dbus-1 x11 freetype2 xext xft xscrnsaver glib-2.0 gio-2.0 pango cairo pangocairo" | ||||||
|  | 
 | ||||||
|  | # check if we need libxdg-basedir
 | ||||||
|  | ifeq (,$(findstring STATIC_CONFIG,$(CFLAGS))) | ||||||
|  | 	pkg_config_packs += libxdg-basedir | ||||||
|  | endif | ||||||
| 
 | 
 | ||||||
| # includes and libs
 | # includes and libs
 | ||||||
| INCS := $(shell ${PKG_CONFIG} --cflags ${pkg_config_packs}) | INCS := $(shell ${PKG_CONFIG} --cflags ${pkg_config_packs}) | ||||||
| LIBS := -lm -L${X11LIB} -lXss ${XINERAMALIBS} $(shell ${PKG_CONFIG} --libs ${pkg_config_packs}) | CFLAGS += ${INCS} | ||||||
|  | LDFLAGS += -lm -L${X11LIB} -lXss ${XINERAMALIBS} $(shell ${PKG_CONFIG} --libs ${pkg_config_packs}) | ||||||
| 
 | 
 | ||||||
| ifeq (${INCS}, ${EMPTY}) | ifeq (${INCS}, ${EMPTY}) | ||||||
|     $(error "pkg-config failed, see errors above") |     $(error "pkg-config failed, see errors above") | ||||||
| endif | endif | ||||||
| 
 |  | ||||||
| # flags
 |  | ||||||
| CPPFLAGS += -D_BSD_SOURCE -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS} ${INIFLAGS} |  | ||||||
| CFLAGS   += -g --std=c99 -pedantic -Wall -Wno-overlength-strings -Os ${INCS} ${STATIC} ${CPPFLAGS} ${EXTRACFLAGS} |  | ||||||
| LDFLAGS  += ${LIBS} |  | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Sascha Kruse
						Sascha Kruse