diff -ur lshw-B.02.15.orig/src/core/Makefile lshw-B.02.15/src/core/Makefile --- lshw-B.02.15.orig/src/core/Makefile 2010-10-05 02:34:27.000000000 -0700 +++ lshw-B.02.15/src/core/Makefile 2010-10-27 22:52:25.417069825 -0700 @@ -1,10 +1,10 @@ PACKAGENAME?=lshw -CXX=c++ +CXX?=c++ INCLUDES= DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\" -CXXFLAGS?=-g -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS) -LDFLAGS= +CXXFLAGS ?= -g +CXXFLAGS += -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS) LDSTATIC= LIBS= diff -ur lshw-B.02.15.orig/src/gui/Makefile lshw-B.02.15/src/gui/Makefile --- lshw-B.02.15.orig/src/gui/Makefile 2010-10-05 02:34:27.000000000 -0700 +++ lshw-B.02.15/src/gui/Makefile 2010-10-27 22:54:54.870258929 -0700 @@ -8,11 +8,11 @@ DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\" GTKINCLUDES=$(shell pkg-config gtk+-2.0 --cflags) INCLUDES=-I../core $(GTKINCLUDES) -CXXFLAGS=-g -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS) +CXXFLAGS ?= -g +CXXFLAGS += -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS) CFLAGS=$(CXXFLAGS) $(DEFINES) GTKLIBS=$(shell pkg-config gtk+-2.0 --libs) LIBS=-L../core -llshw -lresolv -lsqlite3 $(GTKLIBS) -LDFLAGS= ifneq ($(shell $(LD) --help 2| grep -- --as-needed), ) LDFLAGS+= -Wl,--as-needed endif @@ -39,7 +39,6 @@ $(CXX) $(LDFLAGS) -o $@ $^ $(LIBS) install: all - $(STRIP) gtk-$(PACKAGENAME) clean: rm -f $(OBJS) gtk-$(PACKAGENAME) gtk-lshw.glade.bak gtk-lshw.gladep.bak interface.c.bak interface.h.bak callbacks.c.bak callbacks.h.bak Makefile.bak diff -ur lshw-B.02.15.orig/src/Makefile lshw-B.02.15/src/Makefile --- lshw-B.02.15.orig/src/Makefile 2010-10-05 02:34:27.000000000 -0700 +++ lshw-B.02.15/src/Makefile 2010-10-27 22:53:26.010552033 -0700 @@ -21,11 +21,13 @@ CXX?=c++ INCLUDES=-I./core/ DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\" -CXXFLAGS=-g -Wall -g $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS) +CXXFLAGS ?= -g +CXXFLAGS += -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS) ifeq ($(SQLITE), 1) CXXFLAGS+= -DSQLITE $(shell pkg-config --cflags sqlite3) endif -LDFLAGS=-L./core/ -g +LDFLAGS ?= -g +LDFLAGS += -L./core/ ifneq ($(shell $(LD) --help 2| grep -- --as-needed), ) LDFLAGS+= -Wl,--as-needed endif @@ -48,18 +50,18 @@ .PHONY: core core: - +make -C core all + +$(MAKE) -C core all $(PACKAGENAME): core $(PACKAGENAME).o $(CXX) $(LDFLAGS) -o $@ $(PACKAGENAME).o $(LIBS) .PHONY: po po: - +make -C po all + +$(MAKE) -C po all .PHONY: gui gui: core - +make -C gui all + +$(MAKE) -C gui all .PHONY: nologo nologo: @@ -70,7 +72,6 @@ $(PACKAGENAME)-static: core core/lib$(PACKAGENAME).a $(PACKAGENAME).o $(CXX) $(LDSTATIC) $(LDFLAGS) -o $@ $(PACKAGENAME).o $(LIBS) - $(STRIP) $@ .PHONY: compressed compressed: $(PACKAGENAME)-compressed @@ -93,14 +94,14 @@ manuf.txt: wget http://www.ethereal.com/distribution/manuf.txt -install: all +install: $(INSTALL) -d -m 0755 $(DESTDIR)/$(SBINDIR) $(INSTALL) -m 0755 $(PACKAGENAME) $(DESTDIR)/$(SBINDIR) $(INSTALL) -d -m 0755 $(DESTDIR)/$(MANDIR)/man1 $(INSTALL) -m 0644 $(PACKAGENAME).1 $(DESTDIR)/$(MANDIR)/man1 $(INSTALL) -d -m 0755 $(DESTDIR)/$(DATADIR)/$(PACKAGENAME) $(INSTALL) -m 0644 $(DATAFILES) $(DESTDIR)/$(DATADIR)/$(PACKAGENAME) - make -C po install + $(MAKE) -C po install install-gui: gui $(INSTALL) -d -m 0755 $(DESTDIR)/$(SBINDIR) @@ -110,8 +111,8 @@ clean: rm -f $(PACKAGENAME).o $(PACKAGENAME) $(PACKAGENAME)-static $(PACKAGENAME)-compressed - make -C core clean - make -C gui clean + $(MAKE) -C core clean + $(MAKE) -C gui clean .timestamp: date --utc +%Y%m%d%H%M%S > $@