make pkg-config subtitutable

Gbp-Pq: Name cross.patch
This commit is contained in:
Helmut Grohne 2022-06-27 14:59:29 +08:00 committed by Lu zhiping
parent b7b57dbbb6
commit 4182469fa0
2 changed files with 10 additions and 8 deletions

View File

@ -21,14 +21,15 @@ export SQLITE
export ZLIB
CXX?=$(CROSS_COMPILE)c++
PKG_CONFIG ?= pkg-config
INCLUDES=-I./core/
DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\" -DVERSION=\"$(VERSION)\"
CXXFLAGS=$(CXX_DEB_FLAGS) $(INCLUDES) $(DEFINES)
ifeq ($(SQLITE), 1)
CXXFLAGS+= -DSQLITE $(shell pkg-config --cflags sqlite3)
CXXFLAGS+= -DSQLITE $(shell $(PKG_CONFIG) --cflags sqlite3)
endif
ifeq ($(ZLIB), 1)
CXXFLAGS+= -DZLIB $(shell pkg-config --cflags zlib)
CXXFLAGS+= -DZLIB $(shell $(PKG_CONFIG) --cflags zlib)
endif
LDFLAGS+=-L./core/
ifneq ($(shell $(LD) --help 2| grep -- --as-needed), )
@ -37,10 +38,10 @@ endif
LDSTATIC=-static
LIBS+=-llshw -lresolv
ifeq ($(SQLITE), 1)
LIBS+= $(shell pkg-config --libs sqlite3)
LIBS+= $(shell $(PKG_CONFIG) --libs sqlite3)
endif
ifeq ($(ZLIB), 1)
LIBS+= $(shell pkg-config --libs zlib)
LIBS+= $(shell $(PKG_CONFIG) --libs zlib)
endif
export CXXFLAGS

View File

@ -1,22 +1,23 @@
PACKAGENAME?=lshw
CXX?=$(CROSS_COMPILE)c++
PKG_CONFIG ?= pkg-config
CC?=$(CROSS_COMPILE)cc
STRIP?=strip
OBJCOPY?=objcopy
DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\"
GTKINCLUDES=$(shell pkg-config gtk+-2.0 --cflags)
GTKINCLUDES=$(shell $(PKG_CONFIG) gtk+-2.0 --cflags)
INCLUDES=-I../core $(GTKINCLUDES)
CXXFLAGS=$(CXX_DEB_FLAGS) $(INCLUDES) $(DEFINES)
ifeq ($(SQLITE), 1)
CXXFLAGS+= -DSQLITE $(shell pkg-config --cflags sqlite3)
CXXFLAGS+= -DSQLITE $(shell $(PKG_CONFIG) --cflags sqlite3)
endif
CFLAGS=$(CXXFLAGS) $(DEFINES)
GTKLIBS=$(shell pkg-config gtk+-2.0 gmodule-2.0 --libs)
GTKLIBS=$(shell $(PKG_CONFIG) gtk+-2.0 gmodule-2.0 --libs)
LIBS+=-L../core -llshw -lresolv $(GTKLIBS)
ifeq ($(SQLITE), 1)
LIBS+= $(shell pkg-config --libs sqlite3)
LIBS+= $(shell $(PKG_CONFIG) --libs sqlite3)
endif
LDFLAGS=
ifneq ($(shell $(LD) --help 2| grep -- --as-needed), )