--- lshw-B.02.06/src/Makefile +++ lshw-B.02.06/src/Makefile @@ -13,11 +13,13 @@ export MANDIR export DATADIR -CXX=c++ +CXX ?= c++ INCLUDES=-I./core/ DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\" -CXXFLAGS=-g -Wall -Os $(INCLUDES) $(DEFINES) -LDFLAGS=-L./core/ -Os -s +CXXFLAGS ?= -g -Os +CXXFLAGS += -Wall $(INCLUDES) $(DEFINES) +LDFLAGS ?= -Os -s +LDFLAGS += -L./core/ ifneq ($(shell $(LD) --help 2| grep -- --as-needed), ) LDFLAGS+= -Wl,--as-needed endif --- lshw-B.02.06/src/core/Makefile +++ lshw-B.02.06/src/core/Makefile @@ -1,9 +1,10 @@ PACKAGENAME?=lshw -CXX=c++ +CXX ?= c++ INCLUDES= DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\" -CXXFLAGS=-g -Wall -Os $(INCLUDES) $(DEFINES) +CXXFLAGS ?= -g -Os +CXXFLAGS += -Wall $(INCLUDES) $(DEFINES) LDFLAGS= LDSTATIC= LIBS= --- lshw-B.02.06/src/gui/Makefile +++ lshw-B.02.06/src/gui/Makefile @@ -1,16 +1,18 @@ PACKAGENAME?=lshw -CXX=c++ -CC=cc +CXX ?= c++ +CC ?= cc DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\" GTKINCLUDES=$(shell pkg-config gtk+-2.0 --cflags) INCLUDES=-I../core $(GTKINCLUDES) -CXXFLAGS=-g -Wall -Os $(INCLUDES) $(DEFINES) -CFLAGS=$(CXXFLAGS) $(DEFINES) +CXXFLAGS ?= -g -Os +CFLAGS ?= $(CXXFLAGS) +CXXFLAGS += -Wall $(INCLUDES) $(DEFINES) +CFLAGS += -Wall $(INCLUDES) $(DEFINES) GTKLIBS=$(shell pkg-config gtk+-2.0 --libs) LIBS=-L../core -llshw $(GTKLIBS) -LDFLAGS= -Os -s +LDFLAGS ?= -Os -s ifneq ($(shell $(LD) --help 2| grep -- --as-needed), ) LDFLAGS+= -Wl,--as-needed endif