mirror of https://gitee.com/openkylin/lshw.git
parent
b7b57dbbb6
commit
4182469fa0
|
@ -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
|
||||
|
|
|
@ -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), )
|
||||
|
|
Loading…
Reference in New Issue