Call pkg-config only once during build

Only evaluate these shell commands once at Makefile startup, otherwise
every single call to the compiler/linker will re-evaluate these lines
again and again. This speeds up the build quite a bit for me.
This commit is contained in:
Stefan Gehn 2015-08-14 14:30:04 +02:00
parent eff1865a4b
commit c53159c3b8
2 changed files with 4 additions and 4 deletions

View File

@ -28,8 +28,8 @@ endif
GKRELLMD_INCLUDES = gkrellmd.h $(SHARED_PATH)/log.h GKRELLMD_INCLUDES = gkrellmd.h $(SHARED_PATH)/log.h
PKG_INCLUDE = `$(PKG_CONFIG) --cflags glib-2.0 gmodule-2.0 gthread-2.0` PKG_INCLUDE := $(shell $(PKG_CONFIG) --cflags glib-2.0 gmodule-2.0 gthread-2.0)
PKG_LIB = `$(PKG_CONFIG) --libs glib-2.0 gmodule-2.0 gthread-2.0` PKG_LIB := $(shell $(PKG_CONFIG) --libs glib-2.0 gmodule-2.0 gthread-2.0)
FLAGS = -O2 $(PKG_INCLUDE) FLAGS = -O2 $(PKG_INCLUDE)

View File

@ -44,8 +44,8 @@ endif
GKRELLM_INCLUDES = gkrellm.h gkrellm-public-proto.h $(SHARED_PATH)/log.h GKRELLM_INCLUDES = gkrellm.h gkrellm-public-proto.h $(SHARED_PATH)/log.h
PKG_INCLUDE = `$(PKG_CONFIG) --cflags gtk+-2.0 gmodule-2.0 gthread-2.0` PKG_INCLUDE := $(shell $(PKG_CONFIG) --cflags gtk+-2.0 gmodule-2.0 gthread-2.0)
PKG_LIB = `$(PKG_CONFIG) --libs gtk+-2.0 gmodule-2.0 gthread-2.0` PKG_LIB := $(shell $(PKG_CONFIG) --libs gtk+-2.0 gmodule-2.0 gthread-2.0)
FLAGS = -O2 -I.. -I$(SHARED_PATH) $(PKG_INCLUDE) $(GTOP_INCLUDE) $(PTHREAD_INC)\ FLAGS = -O2 -I.. -I$(SHARED_PATH) $(PKG_INCLUDE) $(GTOP_INCLUDE) $(PTHREAD_INC)\
${SSL_INCLUDE} ${NTLM_INCLUDE} -DGKRELLM_CLIENT ${SSL_INCLUDE} ${NTLM_INCLUDE} -DGKRELLM_CLIENT